`case null:` (here we go)

Brian Goetz brian.goetz at oracle.com
Wed May 2 17:02:12 UTC 2018


> 
> I wonder if there are not 3 steps:
> 1/ the expression switch
> 2/ the switch on new kinds any type, long, handling of null
> 3/ the full pattern matching that can do match, extract, backtrack, match, extract, backtrack, etc
> 
> I've separated 2 and 3 because the translation strategy is very different depending if you can do extraction or not, technically, it's if you can do matching on extracted data that change the translation.

Yes, this is defensible as well.  From a perception management perspective, I think its good to deliver batches of related features together, because users are already going to have a hard time remembering what was added in 12 vs 13 vs 14.  So remembering “switch on long in 12 and switch on float in 13” is hard, but “all the new switch goodies in 13” is easier.  That’s not a hard and fast rule but its something to put in the decision mixer.  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180502/b1a99220/attachment.html>


More information about the amber-spec-experts mailing list