On 1/3/2000 at 10:39 AM [EMAIL PROTECTED] wrote:
{{
Two values may not be the same even when they are identical in value.
}}
Hear! Hear!
In talking about REBOL, the term VALUE is overloaded to mean both the
place whether the value is stored, and the content of that place.
In another language, we might say that "A is an integer variable with
the value 2".
Mapped to REBOL, we get "A is a word set to an integer value with the
value 2".
Which is confusing. The next best thing being:
"A is a word set to an integer value with the content 2"
but the word "content" isn't a cannonical term, so someone else might
just as well use a different term, which again is confusing.
I think this gap in vocabulary has lead to a lot of discussion on this
list. Closing this gap could also make it easier to talk about series,
where there are two values, one (the data) which is copied by
reference, and the index, which is copied by (?) value.
If we had a standard way to distinguish between the value and the
value's content, many of our discussions would go much easier.
"A word is bound to a value which stores a ______".
It's possible that we are also running into a similar problem with
"evaluate".
-Ted.
*********** REPLY SEPARATOR ***********
On 1/3/2000 at 10:39 AM [EMAIL PROTECTED] wrote:
Hi, Joel,
"Your colts have been faster, sheriff!" 8^)
I felt a need to write something like:
"Rebol Values vs. Human Values" to point out some differences between
the
two notions, so I am picking up the glove.
1) Human Values are considered being the same as long as they are equal
as
e.g. 2 + 3 and 4 + 1, without considering, where they are stored,
written,
recorded,... The same is true in Rebol for special cases, as can be
seen
here:
>> same? 2 + 3 4 + 1
== true
, even though the dictionary is telling:
{{
Returns TRUE if the values are identical objects, not just in value.
For
example, a TRUE would be returned if two strings are the same string
(occupy
the same location in memory). Returns FALSE for all other values.
}}
I do not doubt, that Rebol, not storing the results above at the same
place
in the computer memory, uses the fact that integer values are the same
as
long as they are equal.
One can find a very strange reformulation of the quoted text:
{{
Two values may not be the same even when they are identical in value.
}}
The above sentence sounds totally absurd to everyone, I think. Why?
Because
it uses the word "value" in two different meanings. If I use a
reformulation:
{{
Two Rebol Values may not be the same even when their Human Values are
identical.
}}
, it seems to have some meaning, but, what is worse, it proves, that
Rebol
Values and Human Values are not the same notions.
This didn't help us to find, where is the difference between Human
Values
and Rebol Values.
To be continued...
Ladislav
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 03, 2000 3:52 AM
Subject: [REBOL] Evaluation Re:
> [EMAIL PROTECTED] wrote:
> >
> > datatype!, object!, port!, refinement!, none!, logic!, integer!,
> > decimal!, money!, time!, date!, char!, tuple!, bitset!, string!,
> > issue!, binary!, file!, email!, url!, tag!, block!, hash!, list!
> >
> > All the values of these types evaluate returning themself.
> >
>
> And some of them have some curious behavior! In the case of
>
> >> mytime: now/time
> == 20:32:33
> >> mytime/hour
> == 20
> >> mytime/minute
> == 32
> >> mytime/minute
> == 32
> >> mytime/minute: 35
> == 20:35:33
> >> mytime
> == 20:32:33
>
> and
>
> >> mydate: now/date
> == 2-Jan-2000
> >> mydate/day
> == 2
> >> mydate/month
> == 1
> >> mydate/year
> == 2000
> >> mydate/day: 3
> == 3-Jan-2000
> >> mydate
> == 2-Jan-2000
>
> it would appear that we have composite values that are immutable,
> in the sense that they possess internal structure, but an attempt
> to change a component of that structure returns a new value of the
> same type, without modifying the original. This is, of course, in
> contrast to the mutability of strings.
>
> Incidentally, this also puts an interesting spin on the 'same?
> function. As the internals of a time! or date! can't be altered,
> it is "safe" to consider any two equal time or date values to be
> the same:
>
> >> mydate
> == 2-Jan-2000
> >> otherdate: make date! reduce [1 + 1 2 - 1 2 * 2 * 500]
> == 2-Jan-2000
> >> same? mydate otherdate
> == true
>
> >> mytime
> == 20:32:33
> >> othertime: make time! reduce [4 * 5 2 * 8 * (1 + 1) 3 * 11]
> == 20:32:33
> >> same? mytime othertime
> == true
>
> -jn-
>
>
>