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

[REBOL] R: Re: Links ? Pointers ?

From: gchillemi:aliceposta:it at: 26-Aug-2009 20:02

> He's talking about the possibility of multiple variables > pointing at an immutable value: > > >> X: make object! [Name: {Spock}] > >> A: B: :X
You are right !
> Then, say, changing the object entirely: > >> X: make object! [Species: {Human}] > and having A and B now also point to the new object.
You have interpreted correctly my message.
> Here's a way to simulate it: > >> X: reduce [make object! [Name: {Spock}]] > >> A: B: X > >> X/1: make object! [Species: {Human}] > Now, A/1 and B/1 also point at the new object.
I whish a more direct way able to be able to link to a function and have many object point to that function and reuse the code. Giuseppe Chillemi