Robert wrote:
>In my sense it should print c as this is the name of the actual
>object reference being used.
What makes this object reference "actual" versus other references? An
object - as someone previously stated - can have multiple words referencing
it simultaneously - or none at all. Which is the "actual" word referencing
the following object:
a: make block! []
insert a make object! []
b: first a
c: first a
It's obviously not 'a, since 'a is referencing the block containing the
object. Why would it be b rather then c or vice versa?
a: make object! []
b: :a
Is 'a the actual reference? If so, what if the code continues with the
following instruction:
a: make block! []
Another example:
a: make object! []
b: :a
unset 'a
In both cases 'a no longer points at the object! What's the object's
"actual name" now? If you say, ok, now b has become the "actual" reference,
then you are saying that modifying which value a word references should
modify something about the value it previously referenced, namely what is
considered to be that value's "actual" reference.
That introduces a new level of complexity, which is bound to slow down the
overall processing of assigments under REBOL, opens up a new possible
source of bugs and script failures, for what?
I believe, in a previous message you were using the term "name" for what
you hear call "actual reference". A word is a reference to a value. A word
is NOT a name of a value. The term "name" - as you use it - suggests a
closer, more exclusive relationship between a word and the value it happens
to reference, than is intended by the term "word" that we use under REBOL
for symbols that reference values. A word is not an attribute of a value -
this value possibly being an object - the opposite is true. A value is an
attribute of a word. A word can only reference one value at any given time
(this value can be a series or an object, in turn containing other values),
whereas a value can be referenced by many words.
There is a one-to-one relationship from words to values - a word can only
referencing a single (possibly container) value within a given context at
any given time -, and a one-to-many relationship from values to words.
When we have a one-to-many relationship between values and words - one
value, many words - REBOL does not provide a mechanism to promote one of
the words to a special status of being the "actual" word.
Therefore, I think when you speak about "names" you are actually proposing
a new REBOL datatype. A datatype that is permanently fixed to an object (or
perhaps a specific value of any datatype?).
What (would be the advantage for introducing this datatype? Under what
circumstances would it be an advantage to have an "actual" reference to a
value? I am not sure why you would want that. What is the problem the new
datatype "name" would solve?
Could you provide an example that shows how REBOL's current paradigm is
weak in comparison to the programs made possible by introducing "actual"
references? It may help me come to a better appreciation of what it is that
you are trying to achieve.
TIA,
Elan