A peek at the roadmap for pattern matching and more
Brian Goetz
brian.goetz at oracle.com
Fri Aug 14 00:18:21 UTC 2020
First, recall that I asked already that we table this digression; I
provided the peek because several folks asked me for some more context,
not to distract us with a shiny bikeshed.
Second, I get what you are saying -- I really do, because I've been
exactly there on my long and winding journey -- and even thought briefly
I had reached the end there. And I totally get the idea that it seems
like we're adding more concepts than we need to. But I'm looking at
this from the point of view of _what mental model do we want to
encourage_, not how can we make the fewest changes to the language. I
realize the "just use a fake tuple" (or anonymous record) appeals to a
sense of economy, but I do not believe it equilibrates in the right
place. We have invested a significant amount in integrating pattern
matching into the language; I don't want to nail something on the side.
> I'm a little disappointed by the current discussions, when Brian announced that a record will be immutable, I was flabbergasted how brilliant the idea was because not only you can use a record and do directly pattern destructuring on it but also you can 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.
And we're doing all those things. Just at the translation level, not
the source level.
> It seems that that plan has been lost at some point.
No, it was not lost, it got extensive scrutiny, I spent a significant
amount of time considering it and working out the details before I
soured on the idea. Not all initially attractive ideas turn out to be
right.
But, back to my top point: this is not the issue that is in front of us
now.
More information about the amber-spec-experts
mailing list