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


I like it. Blocks seem like “true” functions, where current functions always 
carry the method-ish |this| with them. Blocks are especially useful as a 
concise callable construct inside methods.

Questions:

- |this|: How is lexical |this| achieved? Via bind() (or something similar)?

- Can blocks be used as methods? Not as important, because conciseness for 
methods is taken care of by the Concise Object Literal Extensions.

- |return|: Is there a way to return from a block before it ends (like |return| 
does for functions)?

Thus: are blocks completely different from functions or are they translated to 
the same construct (internally). I can imagine this being done to make 
|arguments| lexical, but it seems tricky for handling lexical |this|.

Axel

-- 
Dr. Axel Rauschmayer

[email protected]
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to