Like many others, I use the term "class" to informally describe the things we create in JavaScript using constructors and prototype objects. But JavaScript 2.0 is on the horizon, and since that version of the language has real classes, I want to start using a different term to describe JavaScript 1.x pseudo-classes.
Is anyone aware of a pre-existing convention that I can adopt? I've tried using "category" but I think it is too vague. My current feeling is that I should use the hypenated word "proto-type", although if I do this, I need to be careful not to confuse it with "the prototype object" that we use to create a proto-type.
If you have a thought or better suggestion, I'd love to hear about it. Just retaining our current usage of "class" is an option, too, of course.




The reason we used them in the first place was that they provide something very very similar to the Perl symbol table namespace entries. That is, they are a hash/assoc-array that lets you add additional ones inside it.
So the most common term used for them in JSAN-town is "pseudo-namespace".
category means something else in other languages.
I've just been calling them "constructors" lately, because that's the only word that has any precident in the ECMA-262 literature.
As far as AdamK goes, he's confusing the entire universe lately by calling everything a class, even things that aren't suitable for the new operator (e.g. he calls JSAN namespaces classes, yet they're just plain old objects that have a couple properties) :)
I sometimes refer to them as just 'types' or 'object type'. Plain English, and reasonably descriptive.
I don't like type in this case because type means something else in ECMAScript due to the typeof operator.
I second Bob's opinion here: I call them constructors in my head, and leave it at that.
At first I called them classes as well--partially because it made it easier to introduce to others how it worked--but as I grow older I'm becoming more of the opinion that we need to be *clear* about how ECMAScript actually works, as opposed to using entrenched analogies borrowed from other platforms.
Too bad so few people understand (or have even heard of) things like LISP or Smalltalk...
constructor is the correct terminology
I explain why here (in my own view)
http://www.zwetan.com/blog.cgi/ECMAScript/RaisingHell.html