Hi,
Imagine I have a package Super with a class Super and a package Sub with a class Sub that inherits from Super. If I create a moose model of the package Super, I get the class Sub as a stub. I find that very surprising: why are all subclasses of the system included in the model. The semantics of the inheritance relation is one-way: a class knows its super class, not the opposite. Can somebody explain why subclasses are included in the analyses? -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
2014-10-02 11:39 GMT+02:00 Damien Cassou <[hidden email]>: Hi, I don't know much about the moose model and I consider inheritance as an one-way relationship too, but otherwise, a Smalltalk class *knows* its subclasses.
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Damien Cassou
I understand that the rational behind this, is to populate stubs with the maximum amount of information.
Is this a problem however? Cheers, Alexandre On Oct 2, 2014, at 6:39 AM, Damien Cassou <[hidden email]> wrote: > Hi, > > Imagine I have a package Super with a class Super and a package Sub > with a class Sub that inherits from Super. > > If I create a moose model of the package Super, I get the class Sub as > a stub. I find that very surprising: why are all subclasses of the > system included in the model. The semantics of the inheritance > relation is one-way: a class knows its super class, not the opposite. > > Can somebody explain why subclasses are included in the analyses? > > -- > Damien Cassou > http://damiencassou.seasidehosting.st > > "Success is the ability to go from one failure to another without > losing enthusiasm." > Winston Churchill > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
It may be a problem since when you want to analyse a package, you may not want to pull with him all the subclasses that are in other package. Moreover, we don’t have the same behavior in all languages (for example, in java and ST).
It is possible to choose not pulling the method extension, it could be good to have the same opportunity while creating an mse from ST code not dragging all the subclasses when they are stub, no ? Cheers, Anne Le 2 oct. 2014 à 17:07, Alexandre Bergel <[hidden email]> a écrit : > I understand that the rational behind this, is to populate stubs with the maximum amount of information. > Is this a problem however? > > Cheers, > Alexandre > > > On Oct 2, 2014, at 6:39 AM, Damien Cassou <[hidden email]> wrote: > >> Hi, >> >> Imagine I have a package Super with a class Super and a package Sub >> with a class Sub that inherits from Super. >> >> If I create a moose model of the package Super, I get the class Sub as >> a stub. I find that very surprising: why are all subclasses of the >> system included in the model. The semantics of the inheritance >> relation is one-way: a class knows its super class, not the opposite. >> >> Can somebody explain why subclasses are included in the analyses? >> >> -- >> Damien Cassou >> http://damiencassou.seasidehosting.st >> >> "Success is the ability to go from one failure to another without >> losing enthusiasm." >> Winston Churchill >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Damien Cassou
We could customise the smalltalk importer.
Damien have a look at the Importer may be we can add a setting to control that. On 2/10/14 11:39, Damien Cassou wrote: > Hi, > > Imagine I have a package Super with a class Super and a package Sub > with a class Sub that inherits from Super. > > If I create a moose model of the package Super, I get the class Sub as > a stub. I find that very surprising: why are all subclasses of the > system included in the model. The semantics of the inheritance > relation is one-way: a class knows its super class, not the opposite. > > Can somebody explain why subclasses are included in the analyses? > _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
We customized the smalltalk importer in order to support the not blind importing of subclasses.
We also added tests. Anne (and Stéphane) Le 4 oct. 2014 à 07:54, stepharo <[hidden email]> a écrit : > We could customise the smalltalk importer. > Damien have a look at the Importer may be we can add a setting to control that. > > On 2/10/14 11:39, Damien Cassou wrote: >> Hi, >> >> Imagine I have a package Super with a class Super and a package Sub >> with a class Sub that inherits from Super. >> >> If I create a moose model of the package Super, I get the class Sub as >> a stub. I find that very surprising: why are all subclasses of the >> system included in the model. The semantics of the inheritance >> relation is one-way: a class knows its super class, not the opposite. >> >> Can somebody explain why subclasses are included in the analyses? >> > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |