March 28 meeting notes

Brendan Eich brendan at mozilla.org
Thu Mar 29 11:35:09 PDT 2012


Andreas Rossberg wrote:
> On 29 March 2012 16:11, Brendan Eich <brendan at mozilla.org 
> <mailto:brendan at mozilla.org>> wrote:
>
>     Yesterday, Luke made a stronger point: TCP 'return' means async
>     callbacks (e.g. promise when functions) must be written ML-style,
>     with return value in tail position. Callbacks can be lengthy, so
>     writing and if-else nest with a variable holding the r.v. to
>     achieve this is awkward and users will prefer early returns (so
>     the calllback's spine is the normal execution path). But TCP will
>     make these wrong-return bugs.
>
>
> I actually think this is a less severe problem. Ignoring the issue of 
> potential confusion for users (which is real), the main thing lacking 
> there in terms of expressiveness is some labelled variant of 'return', 
> analogous to break and continue. If we were so inclined, I'm sure we 
> could come up with something usable on that front.

Dave did:

http://wiki.ecmascript.org/doku.php?id=strawman:return_to_label

It did not seem to be headed for consensus and inclusion in 
harmony:proposals when we last discussed it.

/be


More information about the es-discuss mailing list