[REBOL] Re: On mutability and sameness
From: joel:neely:fedex at: 13-Jun-2001 9:19
Hi, Ladislav,
Have read it.
Ladislav Mecir wrote:
> I have got nothing against Occam's razor. But don't forget
> the way how modern microprocessors manipulate bits in the
> main memory, although they normally can read and write only
> bigger chunks of information.
>
I haven't (I just haven't wanted to descend to that level of
detail in this thread). But since you bring it up... ;-)
Don't forget that modern processors can also manipulate bits
in registers, despite the fact that there's no way (for many
CPU architectures) to have a pointer to a register in the
same way that one can have a pointer to a memory address.
By my use of the term, such a register can still be mutable.
By your usage, it could not be.
I truly believe that the concept of whether a value (all by
itself!) is mutable is a *different* issue from whether one
can have a pointer/reference to that value. Your definition
and test cases all hinge on entangling those two issues.
Since we're down at the level of hardware implementation, I
can give examples of all combinations of mutability and (for
lack of a better term) "referrability" (capable of being
accessed via a pointer/handle/reference).
"Referrable" "Non-referrable"
Immutable ROM data, output CPU status data (hardware
registers of ID on some CPUs), overflow
some memory-mapped bits, etc.
controllers
Mutable RAM data, control CPU registers, I/O ports
registers of some on some CPUs
memory-mapped
controllers
> Yes, our points of view differ here. The reason is simple:
> noone of us succeeded to give a simple definition of
> Mutability until now.
>
It seems to me that "capable of having one part changed
without affecting the remaining parts" is a pretty simple
definition. That's the one I use, and it seems to describe
>> a: now == 13-Jun-2001/8:03:15-5:00
>> a/day: 15 == 15
>> a == 15-Jun-2001/8:03:15-5:00
quite adequately. I have yet to see any discussion of why
that wouldn't be the case, that didn't drag in the separate
issue of whether the value of A is sharable (e.g., by some
sort of reference).
> You may dislike it ...
>
Not dislike, just disagree, for the reasons stated above.
-jn-
------------------------------------------------------------
Programming languages: compact, powerful, simple ...
Pick any two!
joel'dot'neely'at'fedex'dot'com