A peek at the roadmap for pattern matching and more

John Rose john.r.rose at oracle.com
Fri Aug 14 00:22:46 UTC 2020


P.S. I’m going to take Brian’s lead now and talk about
the short-term matters immediately in front of us.
It’s been fun…  We’ll get back it later.

> On Aug 13, 2020, at 5:17 PM, John Rose <john.r.rose at oracle.com> wrote:
> 
> On Aug 13, 2020, at 4:53 PM, forax at univ-mlv.fr <mailto:forax at univ-mlv.fr> wrote:
>> 
>> use it as an anonymous carrier of values to transfer the values from a plain old class to a representation you can do destructuring on it
> 
> Yes, something like that could play a role in reifying
> a “bundle of names coming out of a block”, just as an
> object of  functional interface reifies a lambda expressions
> with an ad hoc block (“with a bundle of incoming names
> and an outgoing value”).
> 
> Put another way:  Anonymous named records have the
> same information content as the result of a set (unordered)
> of assignments to typed names.  Hmm…  Does Java have
> a syntax for that?  Could be sugar for constructing values
> of that type.
> 
> In short:  I like those anonymous records, and have
> already proposed some good sugar for creating them.
> 
> And if you have a API point with named parameters
> that takes them positionally (the way the JVM likes
> them), there are various fruitful ways to spread out
> an anonymous record into the correct argument positions
> (starting with a new anti-varargs rule, and an extension
> to MH.invokeWithArguments).  And, given that, you
> *could* (but *shouldn’t*) write that kind of ugly code
> that Guy was calling “not Java”.
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20200813/f03c7bf2/attachment.htm>


More information about the amber-spec-experts mailing list