[External] : Re: Remainder in pattern matching

Remi Forax forax at univ-mlv.fr
Wed Mar 30 18:40:49 UTC 2022


----- Original Message -----
> From: "Brian Goetz" <brian.goetz at oracle.com>
> To: "Dan Heidinga" <heidinga at redhat.com>
> Cc: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Sent: Wednesday, March 30, 2022 8:26:53 PM
> Subject: Re: [External] : Re: Remainder in pattern matching

[...]

> 
> One thing wrapping gains is that it gives us a place to centralize
> "something failed in pattern matching", which includes exhaustiveness
> failures as well as failures of invariants which PM assumes (e.g., dtors
> don't throw.) 

but such centralization is a bad practice, that the reason why catch(Exception) is considered as a bad practice.

BTW, i hope that with loom people will use virtual threads (they are cheap) to manage scenarios where you want to discard a computation if something fails, like in Erlang.

Rémi


More information about the amber-spec-experts mailing list