What would a 1JS-friendly strict mode look like?

Mark S. Miller erights at google.com
Thu Dec 18 07:54:58 PST 2014


On Thu, Dec 18, 2014 at 4:46 AM, Alex Kocharin <alex at kocharin.ru> wrote:
>
>
>
> 16.12.2014, 17:04, "Andrea Giammarchi" <andrea.giammarchi at gmail.com>:
>
>
>
> On Tue, Dec 16, 2014 at 1:50 PM, Felipe Nascimento de Moura <
> felipenmoura at gmail.com> wrote:
>
>
> function () {
>     use strict, safe;
> }
>
> This could allow us to even add some extra scoped-options, such as a safe
> mode..
>
>
>
> I'm quite sure we've discussed already other directives and the unanimous
> answer here was "NO, 'use strict' is already problematic"
>
>
>
> It's problematic mostly because it can't be turned off when it's needed.
>

When is this needed?



> So another directive like "use nostrict" would be welcome imho. Especially
> in modules when "strict" is on by default.
>


    //... strict context
    (1,eval)("...sloppy code...");
    //... strict context




>
> I think we should either deprecate one of the modes, or officially support
> multiple modes and provide a method to switch between them.
>

Feel free to consider sloppy mode deprecated. I do.




>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>

-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141218/14af7d6d/attachment.html>


More information about the es-discuss mailing list