Expression switch exception naming

Mark Raynsford mark at
Wed Mar 28 13:39:47 UTC 2018

On 2018-03-28T14:15:33 +0100
Gavin Bierman <gavin.bierman at> wrote:
> A worry here might be that other future features might want to raise this exception, and the name will be less applicable. Perhaps "UnexpectedValueException"?

Is this really a worry? I mean, it's not really as if unchecked
exception types are in short supply. I'd be in favour of adding more
and more specific exceptions so that instances of them indicated
*exactly* what went wrong (rather than "one of these several different
language constructs went wrong in some way").

Mark Raynsford |

More information about the amber-spec-experts mailing list