Expression closures - use-cases for shortcut lambda syntax (blocks)
brendan at mozilla.org
Thu Mar 15 18:02:38 PDT 2007
On Mar 15, 2007, at 5:37 PM, Vassily Gavrilyak wrote:
> In our team we currently using modified SpiderMonkey for JS and
> MTASC for AS with modified
> lexer (not parser) for support shortcut syntax. We use this syntax
> quite heavily and found it very useful and not a false economy.
> Modification is VERY simple (2 lines in both cases) - when lexer
> found "(\" replace it with "function("
Don't you mean \( instead of (\ above?
I am warming up to this use of backslash. What do others think?
> This way ES could almost for free have a feature that many
> languages (C# 3, Ruby, Smalltalk, Perl) already have
> and developers found this feature useful. Java seems going there
> too with closures proposal.
> And yes, this is just syntax sugar and nothing new for ES that
> aren't already present.
> But developers will fail to recognize that ES actually have blocks
> just because of syntax.
> I am the example of such developer :-).
> Hope it's probably not to late to address those issues.
Syntax matters, it's the user interface. It is not too late, but it
is late. We should discuss pros and cons here in a thread.
More information about the Es4-discuss