Torsten Anders wrote:
Thank you, I might actually be using this in my code!

Just a related question: how is an inherited method etc. of a class looked up? I mean, do all these intermediate classes add a performance penalty when, say, this very first method in Methods is called?

There is no performance penalty in Mozart. Each class uses a dictionary to map its method names (including the inherited ones) to procedures. The table is built when the class is created. The method lookup is thus simply a hash table lookup. Moreover, A does not keep any implicit reference to its ancestors, unless you use static method calls (with the comma operator).

Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to