[squeak-dev] Re: Smalltalk vs SmalltalkImage current woes

Igor Stasenko siguctua at gmail.com
Fri Jul 24 15:24:28 UTC 2009


2009/7/24 Klaus D. Witzel <klaus.witzel at cobss.com>:
> On Fri, 24 Jul 2009 13:53:47 +0200, Igor Stasenko wrote:
>
>> 2009/7/24 Klaus D. Witzel :
>
> ...
>>>
>>> I was responding to a practical issue, not a conceptual one; try
>>>
>>>  Smalltalk at: #Smalltalk put: Smalltalk
>>>
>>> then you should see why that's not possible.
>>>
>> I don't see how this can be a barrier of any sort for a real hacker:
>>
>> (Smalltalk associationAt: #Smalltalk) becomeForward: (#Smalltalk ->
>> Smalltalk).
>>
>> Smalltalk at: #Smalltalk put: Smalltalk
>>
>> There are numerous ways how to get around this ;)
>
> Have you considered rehash, .image save & load ?

Since i'm not touching the key - #Smalltalk, such change is immune
from potential hashing issues.
And yes, i saved & loaded image after this brutal hack. It works as usual.

> I've thought about
> replacing (Smalltalk associationAt: #Smalltalk)'s value many times and don't
> want to risk other people's .images just because of *any* silly mistake.
> That's why I'm interested in solutions to the practical side.
>
well this could be done once, tested & shipped with new "core" image.
So you never need to be bothered with this again.

>> Btw, this is another reason to not expose messages like
>> #associationAt: to users.
>
> Yes, one reason is: do not expose #pointersTo:, since then #associationAt:
> can be simulated. And just another one: do not expose #someObject or
> #nextObject ( & friends), since then #pointersTo: can be simulated. (cough)
> back to Smalltalk? :)
>

Right, lets better discuss the pros and cons of such change instead of
 harms to Smalltalk association :)

>> Alas, associations is used by compiler. :(
>
> Sure.
>
> /Klaus
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list