hard to make it act like one. Many have tried this - and failed.
I think we should focus some more on what it is we want to be able to do and
One of the reasons I love Prototype is because it utilises the strengths of the
I don't want a lot of new 'magic' ways of doing stuff that is already possible
pretty clean ways.
Just my 2 cents -- since I felt this discussion was heading in a 'lets make JS
more like Java/C++/etc. (or even Ruby)' :)
Fra: firstname.lastname@example.org [mailto:[EMAIL PROTECTED] På vegne af
Sendt: 23. juni 2007 22:02
Til: Prototype: Core
Emne: [Prototype-core] Inheritance: your thoughts?
We've been working on a more robust class-based inheritance model,
fashioned after Dean Edwards's Base and others like it. There's an
inheritance branch in the SVN repository that shows our latest
We've had some lively internal discussions about syntax. I figured I'd
hold my finger to the wind and see how the list feels about some of
First, go to <http://dev.rubyonrails.org/browser/spinoffs/prototype/
branches/inheritance/test/unit/base.html> and take a look at the
handful of unit tests we've written for inheritance. The fixtures
start at line 60 (Animal, Cat, Mouse) and the tests start at line 315.
Next, consider these questions:
1. Does the current API make sense? Was there anything about it that
surprised you? Anything you'd add or remove?
2. Does "this.parent()" make sense as a way of calling the
superclass's method? (We can't use the word "super" because it's
3. Right now there are a few "magic" properties in class instances:
"superclass," "subclasses," and "parent." Is this too much magic? Not
enough magic? Do you think these are likely enough to conflict with
existing properties of a class that it's worth namespacing them
somehow? ($superclass, $subclasses, $parent, etc.)
Feel free to make feature requests or ask other questions. Kudos to
Alex Arnell's inheritance scheme <http://twologic.com/projects/
inheritance/> for getting all of this started.
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at