Bill Page wrote:
> 
> On Tue, Nov 18, 2008 at 8:48 AM, Waldek Hebisch wrote:
> >
> > Martin Rubey wrote:
> >>
> >> I just noticed that in the interpreter, has does not work on operations:
> >>
> >> in FriCAS:
> >>
> >> (1) -> Float has random: Float -> Float
> >>
> >>    >> System error:
> >>    newHasTest expects category from
> >>
> >
> > In FriCAS the official form is:
> >
> > Float has signature random: Float -> Float
> >
> 
> -1 Yuck. Another keyword? :-(
> 

Sorry for the noise: I misremembered about 'signature'.

> I think that testing for specific function signatures should be
> avoided. That leads to the "slippery slope" of full reflection and
> run-time types - something that the original designers of Axiom
> intended to avoid.
> 

No.  Even without tests Spad needs runtime representation of types.

_Without_ tests conditional signatures would be less usefull then
there are now.  You may argue that testing for categories is
cleaner, but both ways have its own problems (for example, as Ralf
pointed out there are no semantic checks), and testing for signature
may better explain programmer intent (for example you may test for
presence of coercion).  Actually, since signature which appears in
tests are static such test do not interfere too much with static
type checking.

Concerning runtime types: the original design was to have runtime
representation of types but avoid runtime type checks.  Also, the
idea was to do static resolution of overloading (but still the
actual functions to call are determined only at runtime).

Concerning reflection: reflection complicates semantics and
it is easier to implement language without reflection.  But
reflection has some good uses and I would like to support
them (as long as there is no conflict with compilation).

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