`case null:` (here we go)
Brian Goetz
brian.goetz at oracle.com
Wed May 2 12:14:33 UTC 2018
I think this is a little too strong. default is associated with switch, and we probably do need to massage switch’s handling of default, but we don’t need to make it a full blown pattern. And we probably don’t want to; saying
case Foo(default): …
or
if (x instanceof Bar(default))
doesn’t make much sense. So I agree it should be rehabilitated, but not by quite that much.
> Now that we have decided that the -> syntax doesn't allow fallthrough, i think we have no choice but to allow, default has a possible 'Pattern' in the grammar.
More information about the amber-spec-observers
mailing list