Vote for Kernel test: (Array allSubclasses size) = 0 [ Was: Re: FixedIdentitySet ... ]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Vote for Kernel test: (Array allSubclasses size) = 0 [ Was: Re: FixedIdentitySet ... ]

Igor Stasenko
2009/12/24 Nicolas Cellier <[hidden email]>:

> 2009/12/23 Martin McClure <[hidden email]>:
>> 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.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Vote for Kernel test: (Array allSubclasses size) = 0 [ Was: Re: FixedIdentitySet ... ]

Nicolas Cellier
2009/12/23 Igor Stasenko <[hidden email]>:

> 2009/12/24 Nicolas Cellier <[hidden email]>:
>> 2009/12/23 Martin McClure <[hidden email]>:
>>> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

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