Someone said you can have (implementation inheritance) with Rebol using get. So I tried:
shape: context [
x: 0
y: 0
draw: func['object][
probe get object
]
]
circle: make shape [
radius: 10
draw: get in shape 'draw
]
rectangle: make shape [
draw: get in shape 'draw
]
I want to pass the object by reference not by value so I pass only the name using 'Object. But then I have to call it like this
circle/draw 'circle
which is rather lame as I need to repeat the name circle twice while in usual inheritance there is the this keyword which avoid this kind of unatural syntax. Is there a more elegant way ?
Thanks.