Ralf Hemmecke wrote:
> 
> On 11/03/2015 08:40 PM, Waldek Hebisch wrote:
> > AFAICS you hit Spad feature
> 
> It's not a bug. It's a feature. ;-)
> 
> > called operation subsumption.  According
> > to Davenport paper, given  foo: (R, N) -> R and foo: (R, Z) -> R
> > the first one is subsumed by the second, that is the secend
> > one should be called even if argument is of type N.  This is
> > because N is a subtype of Z.  In his paper Davenport noted that
> > there was some disagreement about this feature...
> 
> Well, then I am probably on the opposite side of Davenport.
> 
> I would agree that if there is a function
> 
>   foo: (R, Z) -> R
> 
> and r: R, n: N, that (even the) compiler is allowed to select this foo
> in order to compile foo(r, n). But if there is a second foo with the
> exact type (R, N) -> R in scope, I would certainly expect that the
> compiler selects the more specific foo.
> 
> Would your reference to "subsumption mean that you are not going to fix
> this bug/feature?

Well, I have to make my mind.  Davenport writes that there should
be subsumption, but actually does not write why.  Reasons that
I can give are rather weak.  OTOH there are several places in
Spad compiler implementing this feature and it is intertwined
with other features, so if we decide to change behavior it
will take time.

-- 
                              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.

Reply via email to