> For the record: I like the current version with &&. It's short and
> easy to understand (as people already know what && means in Java). I
> see no reason in replacing it with `when`, which is more limiting.

I like the && syntax too (though we can invent some nasty puzzlers with 
booleans, such as `case false && false`, which are not so likable.)  But the 
two are not uncoupled; its harder to imagine && as part of the case, and not as 
part of the pattern.  We can of course do many things here, but I worry that 
the choice of operator affects peoples intuition about the semantics.  
(Historically keyword operators like instanceof have the weakest binding 
precedence.)  


Reply via email to