On 28 sep, 09:51, Yanick <[EMAIL PROTECTED]> wrote: > > I think that this is more Java-like (which is my opinion the best OOP > language), and it makes more sense than having an extra parameter in > the consstructor. >
Plus, with that $super prepended to the function arguments list, how can you call a different method in the super class ? Let say that a child class was overriding two or more methods of the parent class, how would it, then, call the super method of the parent class without calling his own, and without necessitating some hacks to get around this (like having a "secret" parameter or field/flag set prior to calling the function) ? It just seems inconsistant that $super would be prepended only to the argument list in overriding functions. I mean, this doesn't have any impact on the caller's side, and calling one method or the other will be transparent, but for the developper, this seems weird at first (to me it does anyway). For a method only present in the parent class, calling this.superclass.method() or this.method() would make no difference at all (except the developper's eye). But for a method overriden in the child class, calling this.superclass.method() and this.method() can be ambiguous when your intention is to call the parent class method (even if this.method() will receive $super as first argument, and that you're using hacks or something inside the child method to call the parent one instead....) In the end, it seems to me that this is more of a consistency matter, but if this implementation can run into issues that this current implementation avoids, I'm all ears. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
