[REBOL] Re: Run Time Object Type Identification
From: greggirwin:starband at: 2-Oct-2001 10:08
Hi Phil,
I think the best approach will depend on what it is you need to accomplish.
Because objects are cloned, they are very independent. If you want to
categorize objects, you could add the 'type or 'kind word as you did in your
example. If you want to find if they support one or more interface
mechanisms, it should be easy to write a little function to do that (can-do?
supports? supports-all?).
I'm too much of a newbie to suggest what is best, but my gut tells me that
adding type-info blocks to all objects, to support RTTI, is something to
reserve for cases where you really need it, rather than making it a general
rule.
--Gregg