10.7: adda/tracking a type's operations for generics:
. how is a sub' generic?
the type is infered by
the operations used by an untyped arg [.?]
[?.] ptr's to the arg's methods for these operations
become implicit param's of the subroutine .
. so that's a needed property:
given an object and a function name,
get a ptr to obj's method for that function .
. how to include multiop's?
eg, cvt2str(x.tall, y.string)?
an arg is given an obj,
and every obj has a particular type at any given time,
that type must have collected a dbase of
every aux'function whose signature includes that type .
[10.10:
or the system needs to keep a dbase of operations
where methods can be found dynamically . ]
No comments:
Post a Comment