On Jun 25, 4:41 am, "Gareth Evans" <[EMAIL PROTECTED]> wrote:
> Is Base an option for the naming of the parent class?
I'd vote against it assiduously. It was my problem with Dean's
original naming as well. In a deep class structure (Organism > Animal
> Cat) it implies that the method being called is the *root* class's
method, not the parent class's method.
On Jun 25, 4:54 am, "Kjell Bublitz" <[EMAIL PROTECTED]> wrote:
> Yes, keep it lower-case and add an "s" so it reads better :)
> Cow-Class "extends" Animal (and) "includes" Eatable, Breadable ...
We can't; "extends" is a reserved word in JavaScript, just like
"super."
On Jun 25, 4:39 am, "Kjell Bublitz" <[EMAIL PROTECTED]> wrote:
> Parent:
> Please don't overuse the $ sign. It should be used for utilities and
> nothing else. Don't mix it in other areas, such as classes.
Not quite. It's popularly used for utility methods (in Prototype and
elsewhere) because it's:
(a) short;
(b) a valid character in identifiers;
(c) obscure, reducing the chance of naming collision.
Also note its use in "$break" (and the deprecated "$continue") as an
approximation of a reserved word.
On Jun 25, 4:05 am, DK <[EMAIL PROTECTED]> wrote:
> Yes, but JavaScript is different. The class is really a (function)
> object in JavaScript - it isn't common, but this makes JavaScript a
> very flexible language. We can't compare JavaScript in everything to
> other OO languages.
This isn't the point I'm making.
I question whether "new Class" makes sense as an equivalent to
"Class.create." The "new" keyword connotes an instance in JavaScript
-- with its own scope and method chain. Not all things being *created*
are instances.
I've stated in our internal discussions that whatever we come up with
should *feel* like class-based inheritance, not prototypal inheritance
wearing a Groucho Marx mask. Both systems have their strengths and
weaknesses, which is why it's a good idea to keep them separate so
that you can choose according to your task. Mixing them up will just
confuse the hell out of people.
Cheers,
Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---