Mutation

Henry G. Baker hbaker@netcom.com
Thu, 15 May 1997 09:43:27 -0700 (PDT)


>  Scott> I'm not arguing against the introduction of immutable things, but I=
>  thought
>  Scott> this was a cute hack.
> 
>  Scott> -- Scott
> 
> But a dangerouse one, also.
> 
> First, according to CLTL2, "it is an error to modify a string being
> used as the print name of a symbol". As a matter of fact, even CLTL
> says that "it is an extremely bad idea to modify a string being used
> as the print name of a symbol".
> 
> If this is true, we aren't allowed to modify the result of
> symbol-name. Period. If you violate the rule, the consequences are up
> to you. I don't understand why symbol-name is forced to _always_ copy
> the string. It should never copy because it doesn't need to do that.

Well, if I am given a random string, I'd be hard put to identify it as
one which was produced as the result of symbol-name.  Putting dire
warnings into language standards is a waste of hot air.  If you want a
rule enforced, then enforce it -- e.g., type the string as
'immutable'.

"The first thing we do, let's kill all the language-lawyers"
(apologies to Shakespeare)

-- 
Henry Baker
www/ftp directory URL:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html