FWIW, ObjectiveC solves this by making literals special subclasses of NSString because they reference data compiled into the static data segment of the executable. Also NSString's are immutable, subclasses NSMutableString are mutable. So modification of literals doesn't come up as it produces a DNU type error.
-Todd Blanchard
On Feb 25, 2007, at 2:26 AM, Klaus D. Witzel wrote:
Hi Damien,
on Sat, 24 Feb 2007 23:29:18 +0100, you wrote:
Ok, I may not use the right word. What comment would you write ?
I cannot write you that comment. Smalltalk was built with a minimum set of unchangeable parts, see "Design Principles Behind Smalltalk" just the sentence after "Good Design"
design_principles_behind_smalltalk.html
Moreover, the design principle does not say minimal, it says minimum.
It turned out the only unchangeable parts are instances of SmallInteger (they are their own oop).
Every object (but the SmallIntegers) can be changed and I disagree with your blaming of the compiler and streams.
/Klaus
2007/2/24, Klaus D. Witzel klaus.witzel@cobss.com:
Hi Damien,
I still think that something is not correct with your analysis. In you comments you write:
"Current compiler uses only one variable for both
strings. I think this is a bug."
But you do not code a variable, instead you code *literals* which, as was mentioned earlier, are also not a constant.
?
/Klaus
On Sat, 24 Feb 2007 19:14:52 +0100, Damien Cassou wrote:
I've written unit tests for this compiler "optimizations". I think they show a bug. See attached file.