Re:Java 17 / JDK 17: General Availability
by evacchi on Tuesday September 14, 2021 @03:11PM
(#28529533)
I think there is ongoing discussion to support
var MyTupleType(Foo foo, Bar bar) = getMeTwoThings();
which IIRC may be even simplified to var MyTupleType(foo, bar) = getMeTwoThings();
EDIT: found it https://mail.openjdk.java.net/pipermail/amber-spec-experts/2... let Point(var x, var y) = aPoint
With the pattern matching the best you are going to get is nasty boiler plate like
That else clause is so terrible you'd probably just rather use the getters from the type.