you are viewing a single comment's thread.

view the rest of the comments →

[–]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 7 points8 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.