Expression closures - use-cases for shortcut lambda syntax (blocks)

Jon Zeppieri zeppieri at gmail.com
Thu Mar 15 19:20:57 PDT 2007


On 3/15/07, Peter Hall <peter.hall at memorphic.com> wrote:
> I think, once I've figured out how to actually type "λ" on my UK
> keyboard (I actually don't know how to enter 0x03BB in my keyboard, I
> had to paste from charmap), I might as well have typed "function(".

Right -- which is why I also like backslash.

Good programming editors, of course, allow you to bind characters to
whatever keys you want.  In DrScheme, on the Mac, λ is mapped to
command-\ by default.  Mail clients tend not to be good programming
editors...

>
> Also, "λ" is a perfectly permissable character for an identifier.
> Wouldn't it cause problems to  give it special meaning? (for Greeks
> especially)

Good point.  It could break some code.

-Jon


>
> Peter
>
> On 3/16/07, Jon Zeppieri <zeppieri at gmail.com> wrote:
> > On 3/15/07, Brendan Eich <brendan at mozilla.org> wrote:
> > > I am warming up to this use of backslash. What do others think?
> >
> > +1
> >
> > > 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.
> >
> > PLT Scheme allows λ for 'lambda'.  JS could allow λ for 'function' and
> > backslash as a poor-man's λ.  I know it's lame to add two synonyms for
> > function, but it's also lame to use backslash explicitly as a
> > lambda-lookalike in a language that already accepts lambdas in
> > identifier syntax.
> >
> > _______________________________________________
> > Es4-discuss mailing list
> > Es4-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es4-discuss
> >
>
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>
>


More information about the Es4-discuss mailing list