A few arrow function specification issues
brendan at mozilla.org
Mon Apr 23 08:19:42 PDT 2012
Andreas Rossberg wrote:
> To be honest, that suggestion confirms one of my fears about "1JS" --
> ending up with a more complicated language with ad-hoc rules about
> which mode applies in which context. Please let's try to resist the
> temptation. As much as I would like to encourage strict mode, I think
> we should keep it orthogonal to other constructs as much as possible.
> I can bear tying it to modules, but let's not go any further.
It's a good point (and I'm not one to "encourage strict mode" if there's
no payoff for developers, but before agreeing, can you enumerate the
cases that matter inside an arrow function body?
Without arguments runtime semantic shifts, and with |this| lexical,
there aren't many strict mode changes left IIRC, and they are pretty
edgy edge cases.
More information about the es-discuss