Allen's lambda syntax proposal

Peter Michaux petermichaux at gmail.com
Mon Dec 1 10:17:29 PST 2008


On Mon, Dec 1, 2008 at 7:31 AM, P T Withington <ptw at pobox.com> wrote:
> On 2008-11-30, at 01:30EST, Brendan Eich wrote:
>
>> // Instead of lambda (a, b, c) { ... }, why not:
>> { |a, b, c| ... } ?
>
> I would rather have a more literate syntax, lest we degenerate to where
> practically any comic book blasphemy is a valid program.

I agree with this sentiment. The phrase "ASCII vomit" comes to mind
and becomes a worry.

Take an ES program and replace all if-else with ?: and then most
functions with {||} and it starts to look quite cryptic.

A reader would have a difficult time even knowing what to look up in a
book index to find out what the {||} that they see in some code is
supposed to be. It wouldn't necessarily be clear that the {} and the
|| are related.

Peter


More information about the Es-discuss mailing list