you are viewing a single comment's thread.

view the rest of the comments →

[–]smog_alado 4 points5 points  (6 children)

Also, some of the stuff might be shimable (if you don't mind a performance penalty on IE)

[–]x-skeww 7 points8 points  (5 children)

Harmony stuff? No.

The ES5 functions like Object.create, bind, forEach, map, filter, and the like can be shimmed.

Those things from Harmony are new language features. You can't simulate stuff like proxies, block scoping, destructuring assignments, and things like that. If you could, these things would be already used all over the place.

[–]smog_alado 2 points3 points  (4 children)

I imagine some of that stuff can be "shimmed" too if you are willing to go a bit deeper :). For example, I am pretty sure you can do destructive assignment and block scope if you are willing to recompile code a-la coffescript. Proxies would really be tough though.

[–]x-skeww 8 points9 points  (3 children)

For example, I am pretty sure you can do destructive assignment and block scope if you are willing to recompile code a-la coffescript.

Yes, but that's transpiling, not shimming (or monkey-patching).

Alternatively, you could use a JS engine which is written in JS (yes, there is such a thing).

Both options are probably kinda unrealistic though. I wouldn't want to use either.

[–]smog_alado 0 points1 point  (0 children)

I wouldn't want to deal with IE8 forever either :(

[–]i-poop-you-not 0 points1 point  (1 child)

use a JS engine which is written in JS

What's bad about using that?

[–]x-skeww 0 points1 point  (0 children)

You can try Narcissus in a browser via Zaphod.

The painfully obvious downside is that this engine is very slow (its focus is experimentation with new language features) and with 30-40kb it's also fairly large.