Effect cases in switch
Stephen Colebourne
scolebourne at joda.org
Wed Dec 13 08:52:14 UTC 2023
>From my perspective:
Semantics: Good
Syntax: Good (`case throws` is good, `catch` is not)
Surprise level: Medium to Low
Key is that the syntax can be read and implicitly understood without
developers requiring training.
Stephen
On Tue, 12 Dec 2023 at 21:23, Brian Goetz <brian.goetz at oracle.com> wrote:
>
> Based on some inspiration from OCaml, and given that the significant upgrades to switch so far position it to do a lot more than it could before, we've been exploring a further refinement of switch to incorporate failure handling as well.
>
> (I realize that this may elicit strong reactions from some, but please give it some careful thought before giving voice to those reactions.)
More information about the amber-spec-observers
mailing list