Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Back to the Advanced Port stuff again

From: rebol:techscribe at: 10-Jan-2001 22:35

Hi Paul, you wrote:
> Lets forget about alternative methods for doing this another way for a > moment and explain where I can find the word that is bound to the port > object given only the object. This is really what I seek to know.
you apparently are not understanding what you are saying. You say "the word that is bound to the port object"! Who is bound to whom? The word is bound. To whom? To the port-object! The port-object is NOT bound to the word! You cannot make a reverse lookup from object to word, because "the port-object is not bound to the word" means that the object does not know that there is a word, that the word is paul, and that paul is bound to the object! Again, paul is bound to the object, the object is NOT bound to paul, it is a one-way relationship, where the word "knows" what it's bound to - that's what a word is there for anyway - but the value - here an object - does not have the faintest idea that it is bound to anything, nor must it be bound to anything (you can have a value that is not bound to anything. Unfortunately the garbage collector will pick it up quite soon ...) If your design is based around the assumption that you want to associate some kind of name value, paul, or gordon, or whatever, with an object programmatically, by turning the name - ie paul - into a set-word! value programmatically - make set-word! :name - and then associating it with the port object, or whatever value, - name: "Paul" new-port: make set-word! :name new-port make port! port-object then you have a DESIGN BUG! Your idea was that by associating the set-word! (here Paul:) with the port-object! you would be able to follow this association backwards, from the port back to the set-word!, here Paul:. You cannot! It's a one-way street. paul -> port-object. Period. Now backwards following Got it? Now, can we talk about alternative methods? Hope this helps, Elan