> On 15 Aug 2015, at 10:46, stepharo <[email protected]> wrote:
>
> Excellent initiative.
>
> In Moose we get
>
> propertyNamed: propertyName
> propertyNamed: name ifAbsentPut: value
> propertyNamed: propertyName ifNil: aBlock
> propertyNamed: name put: value
>
Ah, no, this is version (5). I guess #propertyValueNamed: would be number 6).
> So which one do we take?
I would use the one that is most close to what we do with #at:
The thing is that all these additional words have no meaning. (named, value).
That’s why everyone uses another one.
I think we should have just and API following #at: and #at:put: with “property”
attached to it.
Simple, learnable, easy.
which is (2).
propertyAt:
> Stef
>
> Le 15/8/15 10:24, Marcus Denker a écrit :
>> Hi,
>>
>> I am now adding a property API to Global/Class Variables and Instance
>> Variables (aka Slots).
>>
>> When looking at the other property APIs, we have 4 different conventions:
>>
>> 1) CompiledMethod and Behavior:
>>
>> propertyValueAt:
>>
>> 2) RB AST Nodes:
>> propertyAt:
>>
>> 3) Ring:
>> annotationNamed:
>>
>> and (4) Morphic uses:
>> valueOfProperty:
>>
>>
>> I would like to unify 1-3 as this is all the same use case: attaching meta
>> data to the
>> structural model.
>>
>> I propose to unify the API to the same as the RB AST: just #propertyAt:.
>> Morphic we should
>> not touch...
>>
>> Marcus
>>
>
>