break seen as a C archaism
dl at cs.oswego.edu
Thu Mar 15 18:33:42 UTC 2018
On 03/15/2018 02:11 PM, Brian Goetz wrote:
>> - That we are overloading an existing control construct, "break",
>> to mean something just different enough to be uncomfortable;
>> To some degree yes, since `break <identifier>` already means
> We had rejected this earlier for fairly obvious reasons, but let me
> ask to get a subjective response: would using "return x" be better?
If you are reconsidering options, reconsider "yield", meaning
"break current context with this value".
Which is what we are allowing break with val to mean.
Which argues for allowing either (break-val or yield-val) in lambdas as
> (We abuse it slightly in lambdas, but people seem OK with this,
> probably because they think of lambdas as methods anyway.)
More information about the amber-spec-experts