[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jan 26 16:03:19 1993 
Subject:Re: Re: dlocals etc. (and shallow binding) 
From:David Beasley 
Volume-ID:930126.03 

In article <116670051@otter.hpl.hp.com> sfk@otter.hpl.hp.com (Steve Knight) writes:
>If I write
>    constant foo = {'dog'};
>then the variable foo is immutable -- it always points to the same
>location.  

Unless, of course there is a subsequent line such as:
	constant foo = ['something else'];

Since you can easily redefine constants in this way, even these are mutable.

Using sysprotect("foo"); would provide an extra level of immutability,
but even then that does not prevent a subsequent sysunprotect("foo");
from making foo vulnerable again. I suppose ultimately, immutability 
is a matter of degree, which depends on the amount of effort required
to change the value to something else. The only totally unalterable 
variables are those stored in ROM!
--

David Beasley                          (David.Beasley@cm.cf.ac.uk)    
Department of Computing Mathematics 
University of Wales College of Cardiff                          __o
PO Box 916                                                      \<,   
CARDIFF    CF2 4YN                         ___________________()/ ()___