I am not in dev team but I think that same things I can tell you.
1. In every script language all methods are "virtual" because those we
call through instance reference ("this" in JS) and methods are
reachede dynamically through parrent chain (prototype chain in JS).
2. In JS there is no standard way to get a stack informations, so we
have to wrap real method and provide a way to reach the parent method.
Of corse we can do a generic method for every method in prototype to
be able to call parent method in this way: "ASuperClass.foo(this,...)"
instead of "ASuperClass.prototype.foo.call(this, ...)" but it is no
the same... I implemented this kind of solution in my module...
VMT and JS? It's a kind of higher level language parsed to real JS
code? I am curious.
3. It's not truth. You will inherit all properties of parent prototype
object. For now in 1.6.0_rc0 you don't inherit "static" properties but
maybe it will changed...
I hope I have answered to your questions regardless my bad english...
On Sep 3, 6:20 pm, Andrew Red <[EMAIL PROTECTED]> wrote:
> A set of questions related to inheritance in Prototype:
> 1. will there be virtual methods?
> Like, if A is B's parent;
> A has a() and b() methods;
> B has only b();
> oB is an instance of B.
> So oB.a() to call A#a() with oB as execution context and
> oB.b() to call B#b() with the same oB as context.
> And to make a true virtual method calls possible, to call A#b() from
> oB there's to be a base object reference support. Wich brings me to
> the second point:
> 2. Is there 'base' reference analogy? (Please read on.) Being
> from .NET environment, I'd of course expect to use something like
> this.base.b() to access A#b() (with oB as a context). But I'm sure you
> got different ideas on that.
> Of course, I saw your "$super", first argument. But it makes base
> class reference possible _only_ if the first argument of the
> subclass'es constructor specified, and named '$super'. Doesn't it look
> awkward? I mean, why not leave a constuctor function as is? No plans?
> We've had an extension library for Prototype to implement just that.
> Would you like to have a look? (We use a sort of VMT hash to call
> methods and it's pretty much crafty written.)
> 3. It also seems that child has only parent's methods, not properties.
> I appreciate your aswering to this no less than reading it. Thank you
> in advance.
> Best regards,
> Andrew Revinsky
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