On Mon, May 10, 2010 at 11:18 AM, Lukas Renggli
<renggli@gmail.com> wrote:
> Hi folks. I've just discovered that PackageInfo >> classes� return a
> collection of classes AND traits. This is incorrect.
Why is this wrong? Collections are mostly polymorphic to traits.
I think they are not the same. Even if they are "mostly" polymorphic they are different things. They are not classes. If I ask classes, I want classes. Otherwise I will ask classesAndTraits or just behaviors, but not classes.
That's why there are #allClasses, #allClassesAndTraits, #allBehaviorsDo: � etc
In addition, it is not uniform. It is confusing having places where you have #allClassesAndTraits� (here you understand the allClasses doesn't take into account traits) and then you PackageInfo >> classes that answer all the classes but also� traits.
Cheers
Mariano
�
> Solutions are:
>
> 1) Rename #classes to #classesAndTraits
> 2) Modify #classes so that it ONLY answer classes
>
> I would like to fix it but I am not sure the consequences of such change.
> Maybe Monticello doesn't take into account Traits anymore hahha
Yes, all users of PackageInfo will break.
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project