markmahieu at googlemail.com
Tue Dec 29 16:15:46 PST 2009
On 29 Dec 2009, at 23:15, Neal Gafter wrote:
> On Tue, Dec 29, 2009 at 2:57 PM, Mark Mahieu <markmahieu at googlemail.com> wrote:
> Your example suggests that I should say something like "breaks from the lambda named 'foo' returning 'bar'", but if its producing a result from the lambda then "return" is exactly the word I'd like to avoid here.
> I would use the word "result":
> The statement
> break Identifier : Expression ;
> terminates execution of the body of the lambda with whose label is given by the identifier, with the result value given by the expression.
Yes, "result" is a superior choice.
However, it's the informal, succinct, conversational description of what the statement does that I'm trying to pin down - the verb, perhaps - which ideally should be suggested by the statement itself. That's why 'yield' is tempting; it's the verb you use in the spec.
In conversations about BGGA, it was often tricky to tell whether someone was talking about a local or nonlocal return because both would often be informally described as 'returning'.
Maybe I'm looking at this the wrong way though, and it's not so much the *kind* of return/yield that should be emphasised, but *where* it is returning/yielding from. Which is certainly what this labelling idea suggests.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the closures-dev