

Strict Mode Is Coming To Town - bootload
http://www.yuiblog.com/blog/2010/12/14/strict-mode-is-coming-to-town/

======
sayrer
Current state of support for strict mode:

WebKit nightly: yes

Firefox 4 nightly: yes

Chromium Nightly: no

Opera 10.6: no

IE9 beta: no

~~~
glhaynes
Do no currently shipping browsers support it?

------
aphexairlines
To be followed by use warnings, use integer, use bytes, use 5.008, etc.

~~~
tzs
If only they would add "use Lua"...

------
j4mie
"The arguments pseudo array becomes a little bit more array-like in ES5. In
strict mode, it loses its callee and caller properties."

Anyone know what replaces this?

How would I write this (stupid code that would eventually blow the stack)
without arguments.callee?

    
    
        (function () {
            console.log("hello world");
            setTimeout(arguments.callee, 1000);
        })();

~~~
davnola
It looks like you're forced to use a named lambda.

------
drdaeman
> In C, an extremely unfortunate representation of octalness was selected:
> Leading zero. So in C, 0100 means 64, not 100, and 08 is an error, not 8.
> Even more unfortunately, this anachronism has been copied into nearly all
> modern languages, including JavaScript, where it is only used to create
> errors.

I've never tripped on 0100 != 100 (and never heard of anyone who did — every
programmer I've talked to knew leading zero has special meaning), but this
"anachronism" allowed me to conveniently write `fs.chmod(path, 0640, cb);`.
Thank you, ECMA, for pointless runtime calculations with `parseInt("0640",
8)`.

~~~
__david__
Agreed, they should at least replace it with 0o777 or something. While they're
at it I wouldn't mind 0b10101 notation either.

Considering javascript as a browser only language is shortsighted, especially
given the existence of things like Node.js.

------
j_baker
Semi-unrelated: I don't understand the note at the bottom or the linked
document about the XSS problem. Is there actually a way to prevent XSS that's
under consideration?

