March 28 meeting notes

Andreas Rossberg rossberg at google.com
Thu Mar 29 13:33:28 PDT 2012


On 29 March 2012 21:26, Brendan Eich <brendan at mozilla.org> wrote:

> Nice. This gives functions some of the oomph of block-lambdas (see
> https://gist.github.com/**1677893 <https://gist.github.com/1677893> from
> @wavded [Marc Harter]). However:
>
> * Requires function declarations, or seems to -- too restrictive (vs.
> arrows as block-lambda replacement in the gist above)?
>

I was thinking, it should be possible to extend arrow syntax to allow an
optional name? As in:

  f(n) => n==0 ? 1 : x * f(n-1)

As far as I can see, this does not introduce any ambiguity and could still
be parsed by cover grammar. And as the example shows, would be useful
regardless of return (although not necessarily worthwhile).

* Waldemar's point about try/finally standing in the way of a forced
> return. Perhaps this is "you get what you ask for".
>

I wouldn't make it a catchable exception. Finally blocks are executed, but
catch is orthogonal.

Anyway, just thinking out loud. I'm not proposing any of this for the time
being.

/Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120329/d777a751/attachment.html>


More information about the es-discuss mailing list