[Pharo-project] RGMethodDefininition
How can I figure out whether an RGMethodDefininition is coming from a Trait? method := (DatePrintFormatTester >> #shouldFix:). method origin isTrait "returns true". how can I do the same with Ring?
Good point I'm not sure that we handled that. On Aug 24, 2012, at 4:56 PM, Camillo Bruni wrote:
How can I figure out whether an RGMethodDefininition is coming from a Trait?
method := (DatePrintFormatTester >> #shouldFix:). method origin isTrait "returns true".
how can I do the same with Ring?
I think instead of having a 'package' instVar we should have something like 'origin'. I remember adding #origin to CompiledMethod simplifying quite a bit. On 2012-08-24, at 17:48, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Good point I'm not sure that we handled that.
On Aug 24, 2012, at 4:56 PM, Camillo Bruni wrote:
How can I figure out whether an RGMethodDefininition is coming from a Trait?
method := (DatePrintFormatTester >> #shouldFix:). method origin isTrait "returns true".
how can I do the same with Ring?
origin is not the same as package in CompiledMethod origin refers to the class or trait that actually defines the method we do not have that in Ring. I will add that behavior but not with that name.. It does not say anything to me On 24 Aug 2012, at 17:58, Camillo Bruni wrote:
I think instead of having a 'package' instVar we should have something like 'origin'. I remember adding #origin to CompiledMethod simplifying quite a bit.
On 2012-08-24, at 17:48, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Good point I'm not sure that we handled that.
On Aug 24, 2012, at 4:56 PM, Camillo Bruni wrote:
How can I figure out whether an RGMethodDefininition is coming from a Trait?
method := (DatePrintFormatTester >> #shouldFix:). method origin isTrait "returns true".
how can I do the same with Ring?
On 2012-08-25, at 11:52, Veronica Isabel Uquillas Gomez <vuquilla@vub.ac.be> wrote:
origin is not the same as package in CompiledMethod origin refers to the class or trait that actually defines the method
we do not have that in Ring. I will add that behavior but not with that name.. It does not say anything to me
I think it would work out of the box with just one variable... origin would denote the logical place the method has been defined: normal method: the class trait method: the trait class extension method: the package I think that would make things quite clear...
origin is the place (trait) where the method is originally defined. so this is important. On Aug 25, 2012, at 11:52 AM, Veronica Isabel Uquillas Gomez wrote:
origin is not the same as package in CompiledMethod origin refers to the class or trait that actually defines the method
we do not have that in Ring. I will add that behavior but not with that name.. It does not say anything to me
On 24 Aug 2012, at 17:58, Camillo Bruni wrote:
I think instead of having a 'package' instVar we should have something like 'origin'. I remember adding #origin to CompiledMethod simplifying quite a bit.
On 2012-08-24, at 17:48, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Good point I'm not sure that we handled that.
On Aug 24, 2012, at 4:56 PM, Camillo Bruni wrote:
How can I figure out whether an RGMethodDefininition is coming from a Trait?
method := (DatePrintFormatTester >> #shouldFix:). method origin isTrait "returns true".
how can I do the same with Ring?
On 2012-08-25, at 21:18, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
origin is the place (trait) where the method is originally defined. so this is important.
exactly, I'm just wondering if you need another variable. Cause you have - parent (which I assume is the class the method is installed id) - package (currently used to model extensions/normal methods) I think just having origin would solve this no? (most probably I forgot something :P) Basically you need to know two things of a method, where it is installed and where it came from. The installed place is given in Ring with parent, the place the method comes from however is not always correctly given...
I agree that it is important... But i meant that the name it is not clear and not consistent with the API of Ring. Such behavior such be added indeed. On 26 Aug 2012, at 00:19, Camillo Bruni wrote:
On 2012-08-25, at 21:18, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
origin is the place (trait) where the method is originally defined. so this is important.
exactly, I'm just wondering if you need another variable. Cause you have - parent (which I assume is the class the method is installed id) - package (currently used to model extensions/normal methods)
I think just having origin would solve this no? (most probably I forgot something :P) Basically you need to know two things of a method, where it is installed and where it came from.
The installed place is given in Ring with parent, the place the method comes from however is not always correctly given...
participants (3)
-
Camillo Bruni -
Stéphane Ducasse -
Veronica Isabel Uquillas Gomez