I don’t quite get the leap from “no constant patterns” to changing
    the syntax of deconstruction patterns, but in any case, we
    definitely don’t want this (and in fact, for the same reasons
    cited in the section on constant patterns, and others.)


if case Point(x, y) can not mean instanceof Point p where p.x == x && p.y == y, then case Point(x, y) can have the same meaning has a lambda (x, y), introducing two fresh variables x and y.

If you're making the claim that "It would not be disastrously inconsistent for it to work that way", I agree.  But I think it would still be quite foolish of us to go that way anyway.  The benefit is tiny (a few fewer characters typed) at a very considerable cost -- reduced readability, and potential ambiguities.


Reply via email to