Deconstructors a bit unintuitive?

Brian Goetz brian.goetz at oracle.com
Thu Sep 22 17:25:00 UTC 2022


> With conditionality also comes exhaustivity, we need a way to declare 
> that a group of pattern methods are exhaustive, e.g. the pattern 
> methods Optional.of() and Optional.empty() are exhaustive.
> Because exhaustivity implies conditionnality, in term of syntax we may 
> not need to express conditionality, but only two separate concerns, 
> exhaustivity (or not) and return types.
>
> I think fostering exhaustivity when describing pattern methods play 
> well with the idea of data oriented programming.

Yes, this is on the requirements list.


More information about the amber-dev mailing list