Classes: suggestions for improvement
rnystrom at google.com
Tue Jun 14 13:46:07 PDT 2011
On Tue, Jun 14, 2011 at 1:34 PM, felix <felix8a at gmail.com> wrote:
> > I think that's been considered before. My complaint with it is that Point
> > isn't a prototype. It's a constructor function whose .prototype property
> > the prototype. In other words, the object bound to the name Point isn't
> > prototypical point. It's a constructor/class-thing/type-object kind of
> > thing. It owns the Point prototype, but isn't it itself.
> Hm, by that argument "class" isn't a particularly good term either,
> since the thing created is not a class, it's a thing that generates
> objects that can be considered instances of a class.
That's actually a pretty close definition of a class in other dynamic
languages. In Smalltalk, Ruby, and Python, classes are objects that have
methods to let you create instances of themselves.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss