break seen as a C archaism

Brian Goetz brian.goetz at
Thu Mar 15 18:50:45 UTC 2018

>> 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".

Still feeling a little burned by first time we floated this, but willing 
to try another run up the flagpole....

In Lambda, I used the early "State of the Lambda" drafts as a means to 
test-drive various syntax options.  SotL 2/e floated "yield" as the 
get-out-of-lambda card, and I was unprepared for the degree of "you big 
fat stupid idiot, don't you know what yield means" response I got.  So 
we beat a hasty retreat from that experiment, temporarily settled on 
return, and then failed to circle back.  I still regret the choice of 
return for lambda.

The primary objection to yield was from the async/await crowd that would 
want us to save it for that, but I don't see them as mutually exclusive 
(nor do I think async/await is all that likely, especially with the 
great work happening over in Loom).

The loss of using something other than "break" is that now expression 
and statement switches become more obviously different beasts, which 
might be OK.

More information about the amber-spec-experts mailing list