[Pharo-project] instVarNames vs instVarNamed:

Stéphane Ducasse stephane.ducasse at inria.fr
Mon Sep 24 14:15:13 EDT 2012



On Sep 24, 2012, at 6:51 PM, Camillo Bruni wrote:

>>> Nautilus class instVarNames
>>       ->  #('maxSize' 'cachedLastClasses' 'groups')
>> 
>> ok we get the instance variables
>> 
>> Nautilus class instVarNamed: 'groups'
>> -> error
>> 
>> For me that is wrong. I should not get an error, I should get the actual
>> variable.
>> I mean, why #instVarNames workds but  #instVarNamed: doesn't? That is
>> inconsistent.

to me mariano is right. if I can ask a class for a receiver a list of stuff I should be able to 
send to the same receiver the value of the named elements. 
this distinction is confusing (Normally I know what is metaclass programming)





More information about the Pharo-dev mailing list