The problem of dynamic inheritance
cyberbaixing at yahoo.com.cn
Tue Jan 13 18:17:50 UTC 2004
Thanks, Jecel. Your analysis is very helpful to me! ^_^
I have some questions again when read your answer. Would you please
give me some guidance?
1.You point out my problem is plain inheritance but not the dynamic
> > a _Define: (|
> > f = ('a' printLine. p:b. f).
> > |)
> Note that this object doesn't understand either the 'p:' nor
> messages. And the final 'f' will cause infinite recursion.
I want to know why the object a doesn't understand 'p:' and the 'b'
messages? Doesn't this clause pass the syntax check?
Why the final 'f' will cause endless recursion? Are there other cases
also cause infinite recursion? How can I avoid them?
How can I accomplish the same result of resends by dynamic
c _Define: (|
b = b.
f = ('c' printLine. resend.f).
In definition of c, I can understand the clause 'p*<- a.'. It means a
is the parent object of c. But the clause'b =b.', Does it also mean b
is a parent of c?
Else, I don't understand why the output of c f is
Why c appears two times? I guess it is related with the function
printLine since if I delete it, the output has no any "c".
Why object a works this time without the result of a f which is:
No 'b' slot found in a slots object.
Why b appears two times but with different forms?
More information about the Self-interest