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

Felipe Nascimento de Moura felipenmoura at gmail.com
Tue Dec 16 05:50:58 PST 2014


Interesting question!
I always found it weird, myself!

function () {
    "use strict";
}

It might be a new token, perhaps?

function () {
    use strict, safe;
}

This could allow us to even add some extra scoped-options, such as a safe
mode...I am pretty sure you guys would have even more options in mind,
either to constrain, or to liberate access or features!
An interesting example for that use, would be the way browsers are
implementing the use of es6 and the way you enable it in each browser!
We could use something like (for the future features, as well):

function () {
    use strict, experimental; // allows the use of experimental features
}

function () {
    use strict, unstable; // allows the use of features that are soon going
to be official
}

Cheers.




On Tue, Dec 16, 2014 at 11:08 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
>
> Given 1JS – would strict mode have been done differently in hindsight? How?
>
> Thanks!
>
> Axel
>
> --
> Dr. Axel Rauschmayer
> axel at rauschma.de
> rauschma.de
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>

-- 
*Felipe N. Moura*
Senior Web Developer

Website:  http://felipenmoura.org
Twitter:    @felipenmoura <http://twitter.com/felipenmoura>
LinkedIn: http://goo.gl/qGmq

Meet some of my projects:
BrazilJS Conference <http://braziljs.com.br/>  |  BrazilJS Foundation
<http://braziljs.org>  |  Power Polygon
<http://github.com/braziljs/power-polygon>  |  TheWebMind
<http://thewebmind.org/>  |  PHPDevBar
<https://addons.mozilla.org/pt-BR/firefox/addon/php-developer-toolbar/>
---------------------------------
LinuxUser #508332
*Changing  the  world*  is the least I expect from  myself!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141216/af1d590c/attachment-0001.html>


More information about the es-discuss mailing list