> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 29, 1999 5:47 PM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Re: Constructor semantics? Re:(2)
> I get the point, but there might be some problems.
> What would you except the following code to print?
>
> a: make object! [test1: 1]
> b: make a [test2: 2]
> c: :b
>
> f: func [obj [object!]] [
> print obj/name
> ]
>
> f a
> f b
> f c
>
>
> I guess for a and b it should print 'a and 'b :)
Hi, right.
> But what about 'c?
> After the first three lines, 'b and 'c will "point" to the
> same object. Should it print 'b or 'c?
In my sense it should print c as this is the name of the actual
object reference being used. We could add a dereferencing
accessor to get to deeper levels but this gets complicated and is
not very useful IMO.
> Furthermore, inside the function, all the objects will be
called 'obj.
No problem... as it's a local variable therefore only used as
proxy object.
> to make it even more tricky, consider this:
>
> f make object! [test3: 3]
>
> The object doesn't have a name!
None ;-))
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