Le 16/08/2012 03:11, Erik Reppen a écrit :
Well I went a bit long as I tend to when geeking out on stuff but I
think the topic of how these elements of the language could be used
better moving forward if we're stuck with 'em is interesting. I really
do find it's helpful in debug to have different ways of saying 'fail.'
With these new JIT interpreters moving as fast as they are, I wonder
if it wouldn't be completely ridiculous to eventually attempt to
handle multiple versions of JS.
It seems like handling multiple HTML doctypes became completely
unworkable for a lot of reasons I've only started to understand,
however, so I'm not sure how naive of an idea that is.
What I love about JS is that anything you don't like, you can bend
fold, mutilate, and warp into a shape that you do. That's why I'm a
bit puzzled by the popularity of the compile-down approaches.
You technically can change the shape of the JS environment mostly as you
wish, but most of the time, you "socially" can't.
It has become the social norm to not touch the environment so that
scripts from different sources can "safely" coexist within the same
webpage. The only socially accepted exception is polyfills, because they
implement a standard feature and so are indistinguishable from a native
environment.
At the end of the day, very few people actually change the JS
environment to make it as they wish mostly because most people use other
people code which has expectations over the JS environment (I think it's
probably as much true for node.js because of modules).
Compile-down allows to start fresh with social conventions.
David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss