[DGD]checking inheritance

Gregory D Lewis glewis at maths.adelaide.edu.au
Sat Aug 5 02:12:13 CEST 2000


"boris" <boris at locos.com> wrote:
> Although it works I think it's rather ugly and inefficient way.
> This method has problems. Firstly, it requires that the object
> has a call_other() callable function, which not always is the case.
> Secondly, you must know the exact name of that function. If you
> rename or remove that function, this implementation will become
> a potential bug.
>
> So I wonder if there is a more elegant way of doing this in DGD-LPC ?

You could install the object_info kfuns 
http://www.eyesbeyond.com/dgd/object_info-1-1.1.tar.gz
and use the inherits kfun (which returns a list of the programs that 
are inherited by an object).

This is still for 1.1, but I'm sure I have an updated version for the
experimental line of dgd.  Contact me if thats what you need it for.

-- 
Greg Lewis                              Applied Maths Department
Email : glewis at maths.adelaide.edu.au    University of Adelaide
--
Computer Science is merely the post-Turing decline in formal systems
theory.

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list