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

Rebol Enhancement Request <object>/Parent

 [1/3] from: al:bri:xtra at: 16-Feb-2001 15:26


Rebol Enhancement Request <object>/Parent What would be nice to add to Rebol is a 'parent value, much like the 'self value. The 'parent value is set to the value of object used to 'make this object. For example, with: o: make object! [f: func [] []] oo: make o [] the result of: probe oo/parent would be something like: make object! [f: func [] []] The result of: probe oo/f would be: parent/f So enabling Rebol to have inheritance and still be able to 'mold objects. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/

 [2/3] from: agem::crosswinds::net at: 16-Feb-2001 16:40


If you make an object from an object in an object, who is parent? a: make object![] b: make object![ c: make a[] ] b/c/parent ? But it would be nice, also for a: func[b][ make object! [b: parent/b] ] with function as parent. Currently the reducing of code is done with inner object and argument. Since inner objects are not copied by make. See system/schemes/http/handler or /view, where the face is an argument also to its own face-functions. Some more work (automatics?), but has an advantage: you can make a set of functions and plug it into different objects from one source, like system/view/vid/vid-feel . With »conventional« oops you have to be accurate with the inheritance-order, with argument instead of self / parent you are more free.
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 16.02.01, 03:26:54, schrieb "Andrew Martin" <[Al--Bri--xtra--co--nz]> zum Thema [REBOL] Rebol Enhancement Request <object>/Parent:

 [3/3] from: jeff:rebol at: 16-Feb-2001 9:11


Howdy, Andrew: Did you see the message I posted a little while ago that implemented CLOS type delegation through explicit parent references? It's does pretty much what you are talking about but you define the mechanism. -jeff