>>>> I was also thinking that it would be nice to have the package
>>>> associated with the MethodReference
>>>> eg:
>>>>
>>>>    (Character>>#escapeEntities) package
>>>>
>>>>            -> PackageInfo-Base
>>>>
>>>> What do you think about that?
>
> yes, makes sense.
> But this would be CompiledMethod here, not MethodReference, IMO?


A CompiledMethod should be freed from any information about its  
location (methodClass and selector).

Firstly, CompiledMethod are not only declared in classes. For example,  
you can have methods in Traits or in Layers (context-oriented  
programming).

Secondly, classes, traits or layers have their own method dictionary  
associating CompiledMethods with selectors. Why can't we allow a  
method to be defined with different selectors in different entities ?

Therefore, for me #>> should return a MethodReference containing the  
location informations (the container (class, trait, layer) +  
associated selector) and the actual wrapped CompiledMethod.

I think compiled methods are too strongly dependent on the class system.


Antoine

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to