Is class syntax really necessary ?
rnystrom at google.com
Mon May 23 11:18:05 PDT 2011
On Mon, May 23, 2011 at 8:51 AM, Brendan Eich <brendan at mozilla.com> wrote:
> Class syntax is like a lint brush for such features. If we add it, it will
> accrete more semantics (with unambiguous syntax, I hope) over time. This is
> just inevitable, in my view. It makes me want to resist classes and look at
> smaller and more direct fixes for the two known prototypal hazards.
I think you're point is valid, though a shade more negatively tinged than
I'd like. :)
Class syntax probably will/would gain additional features over time, but I'd
like to believe that it would only gain features that we all agree are
useful and worth their weight in text. I have good faith that we won't just
start slapping new stuff in there willy-nilly. Given that ES's evolution is
consensus-based (and it's based on the consensus of people who all like that
ES is small and simple!) and dependent on clients upgrading, I'm not too
worried that things are going to go all Algol-68 on us.
What I *do* worry about is that ES won't "scale" as quickly as the problems
(Gmail! Flickr! Google Maps!) The only way programs of that size can be
managed by our primitive monkey brains is if we can write code at a higher
level of abstraction. For me, declarative class syntax is a really helpful
tool for doing that.
It's not just about less typing. It's about less distance between intent and
code. That distance has to be covered by everyone reading code, so I figure
the more we can shorten it, the more quickly we can get things done.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss