Switch labels (null again), some tweaking
John Rose
john.r.rose at oracle.com
Fri Apr 23 20:39:45 UTC 2021
On Apr 23, 2021, at 1:10 PM, Brian Goetz <brian.goetz at oracle.com<mailto:brian.goetz at oracle.com>> wrote:
I think the concern on the part of the null-fearers is not so much the O(n) scan (though that's a concern), as much as the subtle difference between `case Object o` and `default`. They are almost identical, except in null. No one likes having to carry that distinction around in their head.
I mildly disagree with this last point: I think that
distinction will cause mild pain to learn, and zero
point zero zero pain to carry around for the rest
of one’s career. I can feel the rule growing in my
own head: “default means old-school null rejection,
a null case label means null acceptance, if both
are present the null case label of course wins.”
Could this explicit null-ing be MaKing the New
nUlls Stand Out?
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20210423/cd58609a/attachment.htm>
More information about the amber-spec-experts
mailing list