Comment on JEP 305
Brian Goetz
brian.goetz at oracle.com
Wed Jan 8 17:51:41 UTC 2020
On 1/8/2020 11:09 AM, alex at syncwords.com wrote:
> Flow-typing of local variables covers 80% of use-cases.
Framing is everything! It may cover 80% of the use cases of this kind
that you think are important to cover, but that's not the same thing.
Flow typing of local variables covers about 1% of the use cases that
pattern matching does; it just so happens we're introducing it in
stages, and in the first stage, it is easy to confuse the two features
(or ignore the parts of one of them that you don't think are important.)
In any case, we hear you loud and clear that "flow typing is all I need"
and that you are skeptical about pattern matching -- which is a
perfectly fine opinion. It may, or may not, make you feel better that
these feature ideas and observations (especially about variable name
shadowing, which seems to be your main gripe) have all been well covered
in the design exploration -- we just came to a different set of
conclusions and priorities.
In any case, bear in mind this is not the "let's debate what features we
think Java ought to have" list - there are many places in the real
world, and on the internet, where you can do that, and you'll find
willing interlocutors. (To put it in terms I know you're familiar with:
"this topic has been closed because it is primarily opinion-based.")
More information about the amber-dev
mailing list