> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 02, 1999 1:25 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Constructor semantics? Re:(5)
> 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.
Hi, first you have a reference and a referee. Than 'actual'
references == referee, that's the current object you are dealing
with, independently from what its referencing to, looks like etc.
So there is a clear border.
> 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/name == a, b/name == none, c/name == b/name == none
> 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.
And if this value was declared in a referencable way, it has a
name.
> A word is NOT a name of a value.
Right, but the declaration of a value has/is a name.
> The term "name" - as you use it - suggests a
> closer, more exclusive relationship between a word and the
> value it happens to reference,
Wrong, no relationship at all, just an attribute to access.
> A word is not an attribute of a value -
> this value possibly being an object - the opposite is true.
A keyword can of course be an attribute of a value. An I'm sure
in the following example the word name can be seen as attribute
of the object:
a: make object!
[
name: "Name of the object"
]
> 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.
On the top-level you are right but I can use things like
Word1/Word2/Word3 and that's what makes Rebol nice. But Word1/...
provides an own context.
> 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.
Correct and word/name would give me the name of the word not the
value.
> 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.
Than replace 'actual word' be referee.
> 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?).
No. What I propose has nothing to do with values at all... only
the words of the value. And I want to have a way to access the
literal representation of the word programmatically from within
itself.
myObject: .... self/name
> 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?
The following problem can be solved:
allMyObjects: block[]
obj1: ... append allMyObjects self/name
obj2: ...
...
objN: ...
doSomething: func []
[
forall objs allMyObjects
[
do objs/Create
...
You get the idea? The objects are now self-contained and I don't
have to remember to add the object's name to some list by hand.
Robert M. Muench, Karlsruhe, Germany
==> ask for PGP public-key <==
When do you want to reboot today?
Use the free portable GUI Library
OpenAmulet from http://www.openip.org