[REBOL] Re: Need help on something tricky...
From: chrismorency:videotron:ca at: 4-Oct-2001 0:29
Hi Tim,
Thanks for replying...
> This isn't the best answer, but think about this until someone else
> reads this.... (my wife is telling me to get my butt away from the
> computer)
> f: func[arg[word!]][print rejoin["the value of " arg " is " get arg]
> >> f 't
> the value of t is 4
I have to admit my first post wasn't clear, I'm tired these days (working
from 9:30 to 18:00 at the job, 19:00 to 2:00 on Rebol is not good for my
health ;). Ok, here's what I meant :
Let's say you have found a way to do class-object-inheritance under Rebol.
This is of course a speculation ;) You would prefer other developers who are
using your library to write it like :
new-class: make-class [
p: "This is a property"
m: func [] [print self/p]
]
which is quite similar to the current implementation of make instead of :
make-class 'new-class [
p: "This is a property"
m: func [] [print self/p]
]
So far this would be simple... however, let's say I want to make sure the
class-name is somehow integrated within the object and the end-result would
look like :
>> probe a
== make object! [
class-name: 'new-class
p: "This is a property"
m: func [] [print self/p]
]
I don't necessary want the developper to add "manually" this class-name
property... and I can't really trust the developper to do so ;) Now I would
need a way to know the receiver of the class while generating the class! and
the only way I can think of is the make-class 'new-class []
This is what I meant, maybe I didn't understand your example though...
Best,
Chris (who's really working on something like this, but as of yet not tested
enough)