[squeak-dev] Re: change class to object

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat May 16 19:44:50 UTC 2009


Thanks to Eliot for reminding this way of Smalltalking.
Why bother with tests when message dispatching does that so well.

Nicolas

2009/5/16 Eliot Miranda <eliot.miranda at gmail.com>:
>
>
> On Sat, May 16, 2009 at 9:29 AM, Hernán Morales Durand
> <hernan.morales at gmail.com> wrote:
>>
>> Dolphin:
>> #becomeAn:
>>
>> VisualAge:
>> #fixClassTo: , #changeToClass:
>>
>> VisualWorks:
>> #changeClassTo:, #changeClassToThatOf:
>
> Note that VW's #changeClassTo: is built upon Behavior>>adoptInstance: which
> is a much better primitive for the VM to implement since it can assume the
> receiver is a valid behaviour.  The changeClassToThatOf: primitive is also
> designedto avoid checking for a valid behaviour.  If I were to attempt to
> standardize I would do so based on adoptInstance:.
>
>
>>
>>
>> But every Smalltalk has its own particularities and specific conditions.
>>
>> 2009/5/16 Sophie <itsme213 at hotmail.com>:
>> > On 2009-05-12 18:31:34 -0500, Hernán Morales Durand
>> > <hernan.morales at gmail.com> said:
>> >
>> >> #primitiveChangeClassTo:
>> >>
>> >> You can see a working example in the Instances Browser :
>> >> http://www.squeaksource.com/LightweightClasses.html
>> >
>> > Is this portable across Smalltalks, or Squeak-specific?
>> >
>> >
>> >
>> >
>> >
>>
>
>
>
>
>



More information about the Squeak-dev mailing list