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 firstname.lastname@example.org
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at