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

Andreas Raab Andreas.Raab at gmx.de
Wed Aug 15 06:41:47 UTC 2001


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReadOnlyGlobals.cs
Type: application/octet-stream
Size: 4720 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010814/50059926/ReadOnlyGlobals.obj


More information about the Squeak-dev mailing list