From: Mark Wilson Date: 2003-08-19T05:49:12+09:00 Subject: Re: Question: immutable strings as design goal? On Monday, August 18, 2003, at 04:01 PM, A.M. Kuchling wrote: > [snip] > Mutable strings also result in a more complicated implementation. One > of > Python's principles is to keep the implementation as simple as > possible; > think of it as XP's rule of "Do the simplest thing that can possibly > work." I think this is part of Ruby's overall philosophy -- the focus is on providing power to the programmer and secondarily on making the language implementation simpler. I am aware (as a result of reading what others have said and not from experience), however, that this does make it harder to write the interpreter, much less to write a Ruby compiler for a real or virtual machine. I think this is one source of the tremendous feeling of gratitude among Ruby users for matz's work. > > [snip] > > So what's a language implementor to do? You could have some sort of > flag on > strings indicating 'this is in a dictionary: no mutation'. Or you could do what Ruby does (as elucidated by Dave Thomas in previous posts). > [snip] Regards, Mark