is ES4 getting too bloated?

Michael O'Brien mob at mbedthis.com
Sun Oct 21 19:03:47 PDT 2007


I may be able to add some input and some experience implementing ES4.

We have chosen to implement the ES4 language creating a compiler and 2 
VMs one in C and one in Java.
We started with a partial implementation of ES3 which did support a 
small subset of ES3 with classes but no VM
design and a very limited library. We currently have most of the ES4 
language implemented and running. While it
has been hard (what challenging programming enterprise worth the effort 
is not difficult!), I think the language
actually wears better once implemented and used, compared to trying to 
write a spec - which is awfully difficult.

I agree the ES4 language is somewhat large and complex. The 
compatibility constraints with ES3 certainly
take a toll in terms of freedom of change and expression. However, we've 
found that implementing the whole
language is quite feasible in a relatively short amount of time with a 
reasonably small team. We started about 12 months
ago and have implemented most of the language with a very small team and 
budget. We expect to be complete Q1 next year.

Like any language, you can use the features to write incomprehensible 
code, but you can also use the features to write
very readable, maintainable and more safe code than was ever possible 
with ES3. While I started with concerns like you
have voiced, the more I use the language, the more I like it.

What we've experienced is that while the spec may seem complicated, 
implementation is often more elegant than
the spec may seem to predict. This is not criticism of the spec and I 
certainly have very high praise for the TG1 team,
but we've found that while some of the spec may seem complex, actual 
usage is often very intuitive. Furthermore, for
implementers, there is great leverage of some features across the entire 
language. For example: adding namespaces,
packages, units, block scope and prototypes may seem quite a mouthful to 
express in the spec -- for implementers,
there is an elegant design in all this and once you have the basics of 
namespaces and block scope you can more
easily implement many language features such as getter/setters by using 
those facilities.

Lastly, as an implementer, having access to the technical materials: 
grammar, wiki and most importantly the reference
implementation and test suite, has been invaluable and greatly 
accelerated our efforts.

Michael O'Brien



Yuh-Ruey Chen wrote:
> Hey all,
>
> I've been watching ES4 development and occasionally contributing input,
> and I have noticed a somewhat disturbing trend. ES4 is getting ever more
> and more complex.
>
> I understand ES4 is a multi-paradigm language and so must be packed with
> features, but I don't think we want a repeat of the C++ template problem
> (where it took nearly a decade just to get most compilers near
> compliance with the C++ spec). My point is that although a significant
> update to ES is needed, if it takes too long to implement a conforming
> compiler/interpreter for it, the adoption of new features is going to be
> slow. Heck, I wonder how willing MS would be to provide a fully (or near
> enough to it) conforming interpreter for ES4 if the spec is so large.
>
> Small proposals like bug fixes and reformed with and company, or
> proposals that generalize syntax to make the language more elegant are
> perfectly fine by me. But we already have such huge features like
> classes, generators, namespaces, type system, and now generic functions.
> Perhaps we should start deferring more features to ES5?
>
> -Yuh-Ruey Chen
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
>
>   



More information about the Es4-discuss mailing list