[ENH][EXPERIMENTAL] Read only globals (was RE: Stability of Squeak)

Stephane Ducasse ducasse at iam.unibe.ch
Sat Aug 18 07:57:11 UTC 2001


Hi Andreas,

I think that having a structure that would define the level of security
would be really nice. Once a friend simply redefined View on VW and did not
get why the system was recompiling and not usable after.
So it would be great to have a walkback when
    - certain methods are redefined (like class for example)
    Once I was building a small metamodel and programming fast without
    noticing that I redefined class, until nothing worked even the debugger.
    It took 30 to realize that indeed I damaged the system.
    - certain classes are redefined

However, this sould not be hard-coded somewhere deep into the compiler
but 'accessible' so that when you want to do what you have to do you can get
rid of these walkbacks.




on 2001-08-15 8:41 AM, Andreas Raab at Andreas.Raab at gmx.de wrote:

> Richard,
> 
>> It must be acknowledged that a programming language where
>> you can do
>> Smalltalk keys do: [:k| Smalltalk at: k put: nil]
>> (which reliably kills Squeak 3.0) is one that is going to
>> be subject to crashes of a kind not common in other programming
>> languages.
> 
> But it must also be acknowledged that it's trivial to fix this problem if
> you know your compiler ;) If you file in the attached CS nothing short of
> #instVarAt:put: will allow you to modify any of the globals in Smalltalk. It
> doesn't capture any newly created globals but that's left as an exercise to
> the reader :-)
> 
> Fun things to try after filing it in ...
> 
> Object := nil.
> Smalltalk at: #Collection put: nil.
> (Smalltalk associationAt: #CompiledMethod) value: nil.
> 
> ... or whatever else.
> 
> [NB, if there are enough people lobbying for this change I might be
> convinced to clean it up and post it]
> 
> Cheers,
> - Andreas
> 





More information about the Squeak-dev mailing list