Ralf Hemmecke wrote:
>
> from Aldor I know the behaviour that if one overloads a function in a
> domain that one inherits from, it does not change the behaviour of the
> other functions.
>
> Can I rely on this behaviour of SPAD?
>
> In particular, coming from other object oriented programming languages,
> one might expect that redefinition of foo in DomA2 has influence on the
> coerce that is inherited from DomA1 in DomA2 (via virtual function table).
>
> Aldor (as per Aldor User Guide) does not change coerce and SPAD is
> seemingly behaving identically,
Yes, this is current behaviour. Basically, question is if
domain D1 inherists function f from domain D2 which uses
function g, should f when called on behalf of D1 use
g from D2 or g from D1. Current agreement is that
using g from D1 gives better semantics. However, is
is easier to implement version when f uses g from D2,
which is current Spad and Aldor behaviour. Given that
we may change Spad compiler to take g from D1, but
such change will not happen quickly. And certainly
we will look at older code to estimate impact of
such change, in particular if it allows improvement
to old code and if it breaks old code. I would guess
that most code will not care. Some will depend on
current behaviourm but that is probably rare. It
is possible but extremaly unlikely that there is
some code which is buggy with current semantics and
would be fixed by such change.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.