In Valhalla we've been building on the language changes in JEP 447 (Statements
Before Super) to move towards a more safe and reliable programming pattern for
initializing final fields. Some of these ideas could make their way into the
next iteration of Statements Before Super, to be further augm
Exception cases can be used in all forms of `switch`: expression
and statement
switches, switches that use traditional (colon) or
single-consequence (arrow)
case labels. Exception cases can have guards like any other
pattern case.
I think I would prefer "case throws
On Tue, Dec 12, 2023 at 4:41 PM Remi Forax wrote:
> Your proposal is fighting against the physics of the VM, when you enter in
> an exception handler (a catch block), the whole stack disapear so you need
> some compiler magic to store everything which is on stack into locals
> before calling a sw
> From: "Brian Goetz"
> To: "amber-spec-experts"
> Sent: Tuesday, December 12, 2023 10:23:09 PM
> Subject: Effect cases in switch
> 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
>
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 s