On Wed, Nov 09, 2011 at 11:42:27PM +0100, Waldek Hebisch wrote:
> [..]
> > > Spad allows much heavier overloading then is possible in Haskell.
> > > [..]
> > 
> > Haskell has much of overloading. I do not know of any example of what
> > needs more overloading. May be, you give such?
> 
> Well:
> 
> 1) Let r be elements of a Ring R and v element of module over R.
>    r*v, r*r, v*r are legal, call different functions (and the
>    function are not related by inheritance) while v*v is
>    illegal.  AFAICS it is impossible to get such result via
>    inheritance.

Yes. 
The DoCon library puts (in Haskell) something like
                       class (Ring r, AdditiveGroup v) => Module r v 
                             where 
                             cMul :: r -> v -> v  
It fails to use (*) here.
On the other hand, in my experience, the summary negative effect of this 
is small.

I thank  Waldek Hebisch  and other people for helpful notes.

------
Sergei

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

Reply via email to