Ralf Hemmecke wrote:
> 
> > SCartesian(n) : Exports == Implementation where
> > ....
> >    Exports ==>  SPointCategory()
> >
> >    Implementation ==>  SPointCategory() add
> > ....
> 
> > I compiled all this without problems but I get errors when I try to
> > call these common functions (such as sipnt and colinearity) like this:
> 
> If you cxan xompile this then that should be reported as a compiler bug. 
> Please cut down to a minimal .spad file showing this.
> 
> It is actually not wrong as such, since you should be able to have
> 
> SPointCategory(): Category == with ...
> 
> and
> 
> SPointCategory(): SPointCategory() == add ...
>
> In other words, SPAD should let you define a category and also a domain 
> with the same name, because they are distinguishable by their types.
> 

No.  There is no overloading for constructors.  Spad compiler
assumes that there is only one contructor with given name and
giving new definition removes the old one.  Stephen Watt argued
that overloading for constructors should be allowed because
in the first compilation stages compiler does not know what
is a constructor and what is ordinary function.  But I am
not convinced: disallowing overloading for constructors
simplifies compiler and I see no gain from allowing it.


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

Reply via email to