[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions about floating numbers, rethink and bug report
From: |
Per Bothner |
Subject: |
Re: Questions about floating numbers, rethink and bug report |
Date: |
Wed, 10 Oct 2001 09:41:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4+) Gecko/20010918 |
Chris Cramer wrote:
R5RS compliance is great, but I really think that is going too far. If
you do it that way, there's a way to specify read-only literals, but
there's no way to specify writable literals,
There is no such thing as a "writable literal", since a literal refers
to the
program text. There are objects whose value is specified by a literal, or
(if you prefer) literals that are read as writable objects. However,
writing
to an object that was read from a literal is like replacing the literal
"5.0".
While some old Fortran compilers would let you to that, no-one claimed
that as a feature. It is just made for hard-to-catch bugs.
For instance, in C, you can do
const static char foo[] = "blah";
which will make it read-only, or you can do
static char foo[] = "blah";
In Scheme you can do:
"blah" ;; constant
or:
(string #\b #\l #\a #\h) ;; writable
or:
(copy-string "blah") ;; writable
Similarly, for vectors:
#(3 4 5) ;; constant
vs:
(vector 3 4 5) ;; writable
- Re: Questions about floating numbers, rethink and bug report, (continued)
- Re: Questions about floating numbers, rethink and bug report, Neil Jerram, 2001/10/14
- Re: Questions about floating numbers, rethink and bug report, Dirk Herrmann, 2001/10/15
- Re: Questions about floating numbers, rethink and bug report, Neil Jerram, 2001/10/16
- Re: Questions about floating numbers, rethink and bug report, Dirk Herrmann, 2001/10/16
- Re: Questions about floating numbers, rethink and bug report, Neil Jerram, 2001/10/20
- Re: Questions about floating numbers, rethink and bug report, Chris Cramer, 2001/10/10
- Re: Questions about floating numbers, rethink and bug report,
Per Bothner <=
- Re: Questions about floating numbers, rethink and bug report, Keith Wright, 2001/10/10
- Re: Questions about floating numbers, rethink and bug report, Dirk Herrmann, 2001/10/18
- Re: Questions about floating numbers, rethink and bug report, Chris Cramer, 2001/10/11
- Re: Questions about floating numbers, rethink and bug report, Keith Wright, 2001/10/11
- Re: Questions about floating numbers, rethink and bug report, Chris Cramer, 2001/10/11