Finding a "safety syntax" for classes

Russell Leggett russell.leggett at
Tue Mar 20 12:56:26 PDT 2012

On Tue, Mar 20, 2012 at 3:55 PM, Herby Vojčík <herby at> wrote:

> Russell Leggett wrote:
>> On Tue, Mar 20, 2012 at 2:55 PM, David Herman <dherman at
>> <mailto:dherman at>> wrote:
>> Yes, I debated about this. In fact, I almost did go with new.
>> Personally, I'm fine with either. I think what swung me in favor of
>> "constructor" was:
>> * other people seem to be happy with it, and that's what I'm shooting
>> for here
>> * CoffeeScript uses it. I don't really use CS, but it seemed short
>> enough for them.
>> * anyone making an additional .constructor is doing something bad, or
>> maybe I just can't think of a good reason.
> Well, I favour constructor because it blends well with the underlying
> mechanics... there _is_ a property named constructor in a prototype,
> pointing exactly to the constructor method of that prototype. So if I looks
> at the class {...} block as a blueprint for how the .prototype of the class
> will look like, it is the right name.

Haha, yes - that too. Forgot to mention it!

>  Let's chalk this one down as a bike shedding issue that won't hold it
>> back.
>> - Russ
>>    Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list