why mooseName lost its comment?

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

why mooseName lost its comment?

Stéphane Ducasse
Hi guys

MooseElement>>mooseName
        "Returns an unique identifier of this entity.  This method is mandatory, and must
        return a Symbol or Integer that uniquely identifies this entity within its model (but
        not within the entire Moose enivronment, see MooseElement>>mooseID). The return
        value must not be nil, and must never change. The implementation should be fast,
        as this key may be used extensivley by the MooseModel or similar facilities."
         
        ^self mooseID asString "asSymbol -- check if this really works with Integers
                                                                                as well, else change sender!"


was like that
and now MooseEntity>>mooseName
       
mooseName
        | stream |
        ^ self privateState
                propertyAt: #mooseName
                ifAbsentPut:
                        [ stream := (String new: 64) writeStream.
                        self mooseNameOn: stream.
                        ^ stream contents asSymbol ]

so why the comment got lost?

Stef
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: why mooseName lost its comment?

Tudor Girba-2
The comment got lost when we merged MooseElement with MooseEntity (given that MooseEntity was the only subclass).

Well, the MooseElement>>mooseName original implementation was not used anymore, as mooseName got overridden in MooseEntity (which used to be a subclass of MooseElement). Furthermore, mooseName is no longer a unique identifier, so the comment was partly obsolete.

So, now I just kept:

> "The return value must not be nil, and must never change.
> The implementation should be fast, as this key may be used
> extensively by MooseGroup or similar facilities.
>
> Do not override this method.
> Instead, use mooseNameOn: to customize the result."

Cheers,
Doru


On 30 Oct 2011, at 20:44, Stéphane Ducasse wrote:

> Hi guys
>
> MooseElement>>mooseName
> "Returns an unique identifier of this entity.  This method is mandatory, and must
> return a Symbol or Integer that uniquely identifies this entity within its model (but
> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
> value must not be nil, and must never change. The implementation should be fast,
> as this key may be used extensivley by the MooseModel or similar facilities."
>
> ^self mooseID asString "asSymbol -- check if this really works with Integers
> as well, else change sender!"
>
>
> was like that
> and now MooseEntity>>mooseName
>
> mooseName
> | stream |
> ^ self privateState
> propertyAt: #mooseName
> ifAbsentPut:
> [ stream := (String new: 64) writeStream.
> self mooseNameOn: stream.
> ^ stream contents asSymbol ]
>
> so why the comment got lost?
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"If you interrupt the barber while he is cutting your hair,
you will end up with a messy haircut."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: why mooseName lost its comment?

Stéphane Ducasse

> The comment got lost when we merged MooseElement with MooseEntity (given that MooseEntity was the only subclass).
>
> Well, the MooseElement>>mooseName original implementation was not used anymore, as mooseName got overridden in MooseEntity (which used to be a subclass of MooseElement). Furthermore, mooseName is no longer a unique identifier, so the comment was partly obsolete.
>
> So, now I just kept:
>
>> "The return value must not be nil, and must never change.
>> The implementation should be fast, as this key may be used
>> extensively by MooseGroup or similar facilities.
>>
>> Do not override this method.
>> Instead, use mooseNameOn: to customize the result."

where?
Because I added it back in my image.

Stef


>
> Cheers,
> Doru
>
>
> On 30 Oct 2011, at 20:44, Stéphane Ducasse wrote:
>
>> Hi guys
>>
>> MooseElement>>mooseName
>> "Returns an unique identifier of this entity.  This method is mandatory, and must
>> return a Symbol or Integer that uniquely identifies this entity within its model (but
>> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
>> value must not be nil, and must never change. The implementation should be fast,
>> as this key may be used extensivley by the MooseModel or similar facilities."
>>
>> ^self mooseID asString "asSymbol -- check if this really works with Integers
>> as well, else change sender!"
>>
>>
>> was like that
>> and now MooseEntity>>mooseName
>>
>> mooseName
>> | stream |
>> ^ self privateState
>> propertyAt: #mooseName
>> ifAbsentPut:
>> [ stream := (String new: 64) writeStream.
>> self mooseNameOn: stream.
>> ^ stream contents asSymbol ]
>>
>> so why the comment got lost?
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "If you interrupt the barber while he is cutting your hair,
> you will end up with a messy haircut."
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: why mooseName lost its comment?

Tudor Girba-2
Hi,

On 30 Oct 2011, at 23:01, Stéphane Ducasse wrote:

>
>> The comment got lost when we merged MooseElement with MooseEntity (given that MooseEntity was the only subclass).
>>
>> Well, the MooseElement>>mooseName original implementation was not used anymore, as mooseName got overridden in MooseEntity (which used to be a subclass of MooseElement). Furthermore, mooseName is no longer a unique identifier, so the comment was partly obsolete.
>>
>> So, now I just kept:
>>
>>> "The return value must not be nil, and must never change.
>>> The implementation should be fast, as this key may be used
>>> extensively by MooseGroup or similar facilities.
>>>
>>> Do not override this method.
>>> Instead, use mooseNameOn: to customize the result."
>
> where?
> Because I added it back in my image.

I just committed :).

Doru

> Stef
>
>
>>
>> Cheers,
>> Doru
>>
>>
>> On 30 Oct 2011, at 20:44, Stéphane Ducasse wrote:
>>
>>> Hi guys
>>>
>>> MooseElement>>mooseName
>>> "Returns an unique identifier of this entity.  This method is mandatory, and must
>>> return a Symbol or Integer that uniquely identifies this entity within its model (but
>>> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
>>> value must not be nil, and must never change. The implementation should be fast,
>>> as this key may be used extensivley by the MooseModel or similar facilities."
>>>
>>> ^self mooseID asString "asSymbol -- check if this really works with Integers
>>> as well, else change sender!"
>>>
>>>
>>> was like that
>>> and now MooseEntity>>mooseName
>>>
>>> mooseName
>>> | stream |
>>> ^ self privateState
>>> propertyAt: #mooseName
>>> ifAbsentPut:
>>> [ stream := (String new: 64) writeStream.
>>> self mooseNameOn: stream.
>>> ^ stream contents asSymbol ]
>>>
>>> so why the comment got lost?
>>>
>>> Stef
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>>
>> "If you interrupt the barber while he is cutting your hair,
>> you will end up with a messy haircut."
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Speaking louder won't make the point worthier."


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: why mooseName lost its comment?

Stéphane Ducasse
Ok me too :)
I took yours :)

On Oct 30, 2011, at 11:08 PM, Tudor Girba wrote:

> Hi,
>
> On 30 Oct 2011, at 23:01, Stéphane Ducasse wrote:
>
>>
>>> The comment got lost when we merged MooseElement with MooseEntity (given that MooseEntity was the only subclass).
>>>
>>> Well, the MooseElement>>mooseName original implementation was not used anymore, as mooseName got overridden in MooseEntity (which used to be a subclass of MooseElement). Furthermore, mooseName is no longer a unique identifier, so the comment was partly obsolete.
>>>
>>> So, now I just kept:
>>>
>>>> "The return value must not be nil, and must never change.
>>>> The implementation should be fast, as this key may be used
>>>> extensively by MooseGroup or similar facilities.
>>>>
>>>> Do not override this method.
>>>> Instead, use mooseNameOn: to customize the result."
>>
>> where?
>> Because I added it back in my image.
>
> I just committed :).
>
> Doru
>
>> Stef
>>
>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 30 Oct 2011, at 20:44, Stéphane Ducasse wrote:
>>>
>>>> Hi guys
>>>>
>>>> MooseElement>>mooseName
>>>> "Returns an unique identifier of this entity.  This method is mandatory, and must
>>>> return a Symbol or Integer that uniquely identifies this entity within its model (but
>>>> not within the entire Moose enivronment, see MooseElement>>mooseID). The return
>>>> value must not be nil, and must never change. The implementation should be fast,
>>>> as this key may be used extensivley by the MooseModel or similar facilities."
>>>>
>>>> ^self mooseID asString "asSymbol -- check if this really works with Integers
>>>> as well, else change sender!"
>>>>
>>>>
>>>> was like that
>>>> and now MooseEntity>>mooseName
>>>>
>>>> mooseName
>>>> | stream |
>>>> ^ self privateState
>>>> propertyAt: #mooseName
>>>> ifAbsentPut:
>>>> [ stream := (String new: 64) writeStream.
>>>> self mooseNameOn: stream.
>>>> ^ stream contents asSymbol ]
>>>>
>>>> so why the comment got lost?
>>>>
>>>> Stef
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "If you interrupt the barber while he is cutting your hair,
>>> you will end up with a messy haircut."
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Speaking louder won't make the point worthier."
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev