In your suggestion, when an occurrence of destructuring (or any other new
syntax) is seen, what unit of code is then opting in to strict? Would it be
the nearest enclosing function, module, class, generator, or Program? I
think I'm warming to the idea.

I think having the opt-in unit be the destructuring pattern and everything
recursively contained within it would be a bad idea. In this regard,
destructuring is a different category of opt-in by new syntax than is
module, class, and generator.


On Wed, Jan 4, 2012 at 4:53 PM, Brendan Eich <bren...@mozilla.com> wrote:

> On Jan 4, 2012, at 4:12 PM, "Mark S. Miller" <erig...@google.com> wrote:
>
> > The problem I see is that the occurrence of some of these new features,
> like a light use of destructuring, may not be notationally obvious to
> readers.
>
> Maybe not, but for such users, strict mode may not be obviously a problem
> either. This may well be the shortest path to migration and adoption, esp.
> compared to version= lock-in.
>
> /be
>
>
> >
> > --
> >     Cheers,
> >     --MarkM
>



-- 
    Cheers,
    --MarkM
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to