Varargs Record Patterns, Literal Record Patterns and Let Expressions vs Member Patterns

Brian Goetz brian.goetz at oracle.com
Thu Apr 4 20:43:30 UTC 2024


I think you may have fallen into an "either/or" trap.  Varargs patterns 
and constant patterns are already on the road map; we experimented with 
an imperative match (let), and found that the obvious interpretation has 
some challenges.  But in any case, these are all part of the story, and 
we don't have to pit one feature against another as the "winner".

On 4/4/2024 4:22 PM, Clement Cherlin wrote:
>
> I know defining new records for new use cases is considerably less 
> than ideal. But I also think "let" expressions, varargs record 
> patterns, and literals in record patterns could deliver 80% of the 
> value of member patterns, with considerably less linguistic 
> complexity. Further, the individual features can be implemented 
> independently.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-comments/attachments/20240404/60332907/attachment-0001.htm>


More information about the amber-spec-comments mailing list