Martin Baker wrote:
>
> On Thursday 10 Nov 2011 18:45:25 Waldek Hebisch wrote:
> > Martin,
> >
> > In scene.spad.pamphlet you copy code with comment:
> >
> > ---- start of common code to all SPointCategory implementations ----
> > -- I would like to define these in SPointCategory but that won't work
> > -- due to lack of polymorphism in spad
> >
> > AFAICS putting this code in SPointCategory is supposed to work.
> > Did you have problem or maybe you just assumend that it would
> > not work?
>
> I tried it and I could not get it to work.
OK. Did you report the problem?
> But before anyone jumps on me, I probably don't mean polymorphism
> though. What I probably meant is there is no dynamic linking to
> function calls so code in a category can't call functions in domain
> that is derived from it.
But there is: code in category part will use functions in the
domain. Of course each such function must appear in category
export list, but definition may came from domain.
There is no OO-dispatch because Spad values do not carry
type information. But when you use code in category part it
knows on behalf of which domain it is running and calls functions
from this domain. So there is dynamic distatch, just different than
OO-dispatch. This is widely used in the algebra.
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en.