instanceVariableNames type vs classVariableNames type

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

instanceVariableNames type vs classVariableNames type

Stéphane Ducasse
coloredPointClass classVarNames
        returns a set
while

coloredPointClass instanceVariableNames
        returns an array

Yeah.... regularity a la Smalltalk

Stef

_______________________________________________
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: instanceVariableNames type vs classVariableNames type

Nicolas Cellier
Well, both are collections.
The order of instance variables is essential for compiling code.
Does the order of class variable names matter ?

Nicolas

2009/9/5 Stéphane Ducasse <[hidden email]>:

> coloredPointClass classVarNames
>        returns a set
> while
>
> coloredPointClass instanceVariableNames
>        returns an array
>
> Yeah.... regularity a la Smalltalk
>
> Stef
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: instanceVariableNames type vs classVariableNames type

Stéphane Ducasse
I do not know if the order of class variable is relevant.
Now I found that a bad design to have that different types.
Regularity is a value because it favors simplicity.
For example I cannot use the same protocol for both tests.

Stef

> Well, both are collections.
> The order of instance variables is essential for compiling code.
> Does the order of class variable names matter ?
>
> Nicolas
>
> 2009/9/5 Stéphane Ducasse <[hidden email]>:
>> coloredPointClass classVarNames
>>        returns a set
>> while
>>
>> coloredPointClass instanceVariableNames
>>        returns an array
>>
>> Yeah.... regularity a la Smalltalk
>>
>> Stef


_______________________________________________
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: instanceVariableNames type vs classVariableNames type

Igor Stasenko
IMO, they should be an ordered collections boths (Arrays, not Sets)

2009/9/5 Stéphane Ducasse <[hidden email]>:

> I do not know if the order of class variable is relevant.
> Now I found that a bad design to have that different types.
> Regularity is a value because it favors simplicity.
> For example I cannot use the same protocol for both tests.
>
> Stef
>
>> Well, both are collections.
>> The order of instance variables is essential for compiling code.
>> Does the order of class variable names matter ?
>>
>> Nicolas
>>
>> 2009/9/5 Stéphane Ducasse <[hidden email]>:
>>> coloredPointClass classVarNames
>>>        returns a set
>>> while
>>>
>>> coloredPointClass instanceVariableNames
>>>        returns an array
>>>
>>> Yeah.... regularity a la Smalltalk
>>>
>>> Stef
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

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