[Pharo-project] Questions on Traits
marcus.denker at inria.fr
Tue Aug 14 13:06:41 CEST 2012
On Aug 14, 2012, at 12:11 PM, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
> On Aug 13, 2012, at 4:31 PM, Noury Bouraqadi wrote:
>> -Why new methods are compiled from the ones of traits? I remember that in the first implementation, when a trait was used by a class, new entries were introduced to the methodDict where the values are the compiled methods from the trait. Currently, a new compiled method is introduced with the exact code of the on from the trait. Why?
>> -It is possible to compile a method that includes a super send in traits. Does it make sense?
> I think yes. But indeed the application of the trait should rebind the "super" encoding
for super sends, the vm looks at the same literal that is returned when calling #methodClass.
So this means that due to updating that, the super sends will just work.
Marcus Denker -- http://marcusdenker.de
More information about the Pharo-project