My bad. I thought obj.foo() and this.foo() were different cases, but they obviously aren’t.
On Nov 1, 2011, at 20:03 , Jeremy Ashkenas wrote: > On Tue, Nov 1, 2011 at 2:58 PM, Axel Rauschmayer <[email protected]> wrote: > > Another point to consider: What happens if there are several calls > super.foo() and the last one makes a call this.foo() (infinite recursion can > be prevented via a parameter) > > We're getting mixed up in time, as I just answered that in the previous > message. To quote myself: > > > ... and even for fancier cases where you restart the same super() chain > > recursively > > from the outside. Imagine if one of the deeper super.one()'s itself calls > > obj.one(), > > with a direct reference to the instance (and a different parameter, to > > avoid infinite > > recursion). You can imagine super counters as a stack instead of a value, > > and > > push a fresh one on, popping it when the new obj.one() call exits. > > ... a simple stack of records, one for each re-starting of the super() chain, > should do. When calling super() from a function, it's easy for the runtime to > tell if that function was itself invoked via super(), or from the top level. -- Dr. Axel Rauschmayer [email protected] home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

