string sharing (possible bug?)

Bill Felton bfelton at ibm.net
Wed Dec 9 21:15:34 UTC 1998


At 12:48 PM 12/9/98 -0500, you wrote:
>> I have to take (minor) issue with your assertion that it would be
>> a good thing if literals could not be modified.  This causes nearly
>> as many problems as it solves, sadly.  Its one of those ideas
>> that sounds so good (like making browsers auto-update when code
>> changes are accepted elsewhere) that can turn around and bite you.
>
>Can you give an example of the kind of problem that would occur from making
>literals read-only (other than backward compatibility)? 

I should think it would make programmatic manipulation of the literal
arrays used by VW's window building system difficult.
I ran into difficulties with it in VA, but honestly, the only one
I can recall is how much harder it made training new folks.  And
I freely admit that such a reason is, in and of itself, not compelling.
But it is, I think, interesting to view the reactions when discussing
whether or not literals should be mutable.  We usually managed to
argue our way into a "damned if you do, damned if you don't" agreement.

Bill





More information about the Squeak-dev mailing list