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

[REBOL] Run Time Object Type Identification

From: phil:hayes:cnutarch at: 2-Oct-2001 13:14

Is it possible to implement something like RTTI to identify object types without having to implement the 'type' var? E.g. obj1: make object! [ type: "obj1" ] obj2: make object! [ type: "obj2" ] o1: make obj1 [] o2: make obj2 [] switch/default o2/type [ "obj1" [ print "obj1" ] "obj2" [ print "obj2" ] ] [ print "Unknown" ] Phil