[Pharo-project] Vote for Kernel test: (Array allSubclasses size) = 0 [ Was: Re: FixedIdentitySet ... ]
2009/12/24 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2009/12/23 Martin McClure <martin@hand2mouse.com>:
Nicolas Cellier wrote:
While looking at it, FixedIdentitySet asArray ^ self, is this really expected ?
FixedIdentitySet is a very odd beast. I'm afraid I don't see the value of it at all, but I haven't looked at the code that uses it.
Regards,
-Martin
Yes, very bad example, only used in traits implementation and should be considered as private, so who ever use it should learn to not send asArray, nor any other inherited message but a few. I suspect inheriting basicAt: basicAt:put: and basicSize: should be enough, which completely disqualify the choice of superclass, but I won't bother more. Anyway, I'm impressed by (Array allSubclasses size), I would expect zero as a good number.
+1 why its subclassing Array, why not Collection? I propose to vote for putting SUnit test, in Kernel tests: self assert: [ Array allSubclasses size = 0 ]. -- Best regards, Igor Stasenko AKA sig.
2009/12/23 Igor Stasenko <siguctua@gmail.com>:
2009/12/24 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
2009/12/23 Martin McClure <martin@hand2mouse.com>:
Nicolas Cellier wrote:
While looking at it, FixedIdentitySet asArray ^ self, is this really expected ?
FixedIdentitySet is a very odd beast. I'm afraid I don't see the value of it at all, but I haven't looked at the code that uses it.
Regards,
-Martin
Yes, very bad example, only used in traits implementation and should be considered as private, so who ever use it should learn to not send asArray, nor any other inherited message but a few. I suspect inheriting basicAt: basicAt:put: and basicSize: should be enough, which completely disqualify the choice of superclass, but I won't bother more. Anyway, I'm impressed by (Array allSubclasses size), I would expect zero as a good number.
+1 why its subclassing Array, why not Collection?
I propose to vote for putting SUnit test, in Kernel tests:
self assert: Â [ Array allSubclasses size = 0 ].
-3 (it's not my vote, it's the evolution of number of subclasses since you posted) Nicolas
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Igor Stasenko -
Nicolas Cellier