Is ES3 good enough? Was incrementally strengthening ES3 paradigms considered?
petermichaux at gmail.com
Thu Nov 8 11:28:35 PST 2007
I've been reading the blogs and fuss over the the ES4 proposal. It
seems to me that if ES3 was so horribly inadequate then big changes to
the language would be welcomed unanimously. It must be that ES3 is
sufficient to get by well enough that we have the luxury to argue
about the worth of the proposed changes.
Was incremental change to the ES3 language ever considered at the
beginning of the process for ES4? It seems there are many places where
the ES3 language could be improved without changing it's character (ie
adding classes). If ES was developed in a hurry then perhaps there was
plenty of room to strengthen the paradigms it already contains. If
work had continued on ES immediately after ES3 was released, isn't
that what would have happened?
There are things that cannot be done with ES3 that could be added...
Could the Self aspect of ES be strengthened? For example, more control
over prototypes and the prototype chain would make programming with
that model of inheritance a stronger competitor to class-based
inheritance. The read/write __proto__ property could be standardized.
Objects could have multiple prototypes like in Self. A obj.clone()
Could the Scheme aspect of ES be strengthened? Tail recursion and let
statements seem like good additions. What about macros? Please!
Binary download for hiding code seems to be something people have been
trying to achieve through obfuscation but cannot truly do with ES3.
Complete support for secure mash-ups seems essential and not just
because Douglas Crockford says so. Developers want to mash-up and are
doing it now even with the security risks to their unknowing users.
Adding types, classes and interfaces is drawing inspiration from
languages with other models of programming. The new look of ES4 is
very Java-like. Are the screams from the Java programmers enough to
control the future of ES? Adding these constructs seems like an
attempt to try to please everyone. This is the classic anti-pattern in
There is an argument that the changes in ES4 are needed for the open
web to keep up with rich platforms like Flash and Silverlight. As far
as snazzy, sparkley user interfaces go, the ES3 language isn't the
problem here but rather it is HTML, the DOM and CSS. Even if Internet
Explorer and all browsers suddenly implemented these other standards
compared with a Flash animation. I gulped last weekend when I saw a
friend's flash portfolio with sound, video and vector graphics and
then thought about my rectangular tabbed panes and drop down menus. I
won't be able to do any of the Flash-like stuff with ES4. This
paragraph isn't intended as an argument against changing ES but I
don't think change to ES should be justified by the "keeping up"
Has ES3 proven itself to be such a disaster that trying to improve it
incrementally while retaining its character is obviously the wrong
choice? Was ES founded on such poor choices (Self and Scheme) that we
should be moving to completely different style of programming (Java)?
I wouldn't be writing this email had others not spoken up. It seems
somewhat inappropriate and rude to speak against what Brendan Eich is
proposing since it is his language.
More information about the Es4-discuss