Switch expressions -- some revisions
john.r.rose at oracle.com
Thu Dec 14 22:17:55 UTC 2017
On Dec 14, 2017, at 2:12 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> With statement switches, it's even more of a stretch. Sure, you can squint and say "the case arm is like a lambda whose args are the binding variables and whose body is the RHS", but it does require squinting.
+1 In short:
Using break to mean "exit the current switch with a value" is
the only conservative keyword-based solution, because break
already means "exit the switch".
C'mon, Kevin, you see that, right?
The naked expression move has already been weighed and
discarded, during the Lambda exercise. I don't see any new
information that would cause us to reopen that as an option.
(Although it would have been my preference at the time.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amber-spec-experts