Short Functions

Tom Van Cutsem tomvc.be at gmail.com
Wed May 25 03:33:15 PDT 2011


>
> Mark and Tom used Ometa for  <http://code.google.com/p/es-lab/>
> http://code.google.com/p/es-lab/ -- slo-o-o-o-wwwww.
>
>
> Yeah it has no memoization. Pretty cool nevertheless as far as what he was
> able to do. Though I really like what Dave is doing on narcissus.
>

OMeta does do memoization, but it's still slow ;-)
Actually, while Mark and I were writing the ES5 grammar in Ometa, we did
discover that it didn't memoize parameterized rules (which we needed for
dealing with the 'NoIn' productions). Based on our use case, Alex Warth
gladly implemented a limited form of memoization for parameterized rules: <
http://tinlizzie.org/ometa-js/#Memoizing_Parameterized_Rules>


>
>
>
> They also are a good fit for transpilers though I realize this is not a
> TC39 goal.
>
>
> We need to consider browser implementations, which must lex and parse
> quickly, and which all (AFAIK) use hand-written lexers and parsers.
>
>
> /be
>
>
> ------------------------------
> *From:* Waldemar Horwat < <waldemar at google.com>waldemar at google.com>
> *To:* Brendan Eich < <brendan at mozilla.com>brendan at mozilla.com>
> *Cc:* es-discuss < <es-discuss at mozilla.org>es-discuss at mozilla.org>
> *Sent:* Monday, May 23, 2011 2:09 PM
> *Subject:* Re: Short Functions
>
> On 05/21/11 23:53, Brendan Eich wrote:
> > That's accurate. But I discounted arrow functions because to be usable,
> to have the syntax you show above, requires GLR parsing (if bottom up;
> top-down may be easier, haven't proven it yet).
>
> GLR parsing would be wild in ECMAScript due to the fact that the lexer is
> dependent on the parser's current state.  A GLR parser is working on a
> quantum superposition of multiple states in parallel, so if it encounters a
> / then some of the superposed states may direct the lexer to interpret it as
> a division symbol while others direct it to start scanning a regular
> expression.  So now you need a quantum entanglement of lexers corresponding
> to the superposed parser states the GLR parser is considering.  Semicolon
> insertion would also be be forced into quantum entanglement with the
> superposed parser states.
>
> Do we really want to go there?
>
>     Waldemar
> _______________________________________________
> es-discuss mailing list
> <es-discuss at mozilla.org>es-discuss at mozilla.org
> <https://mail.mozilla.org/listinfo/es-discuss>
> https://mail.mozilla.org/listinfo/es-discuss
>
>
> _______________________________________________
> es-discuss mailing list
> <es-discuss at mozilla.org>es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110525/564684df/attachment-0001.html>


More information about the es-discuss mailing list