home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!unipalm!uknet!cf-cm!scmdb
- From: David.Beasley@cm.cf.ac.uk (David Beasley)
- Newsgroups: comp.lang.pop
- Subject: Re: Re: dlocals etc. (and shallow binding)
- Message-ID: <1993Jan26.160320.27465@cm.cf.ac.uk>
- Date: 26 Jan 93 16:03:19 GMT
- References: <C1CAwq.8up@cs.bham.ac.uk> <116670051@otter.hpl.hp.com>
- Sender: news@cm.cf.ac.uk (Network News System)
- Organization: University of Wales College of Cardiff
- Lines: 24
-
- 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 ___________________()/ ()___
-