> Bill Page wrote:
>> 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.
>
> I dont' think that is connected to full reflection. But there is another
> problem.

I guess, you can tell that you are getting older by fact that people
seem to be listening to you less and less ... :-)

If you can ask if some domain exports a specific operation, then why
stop there? Why can't we ask for a full list of exports? Why can't we
loop through the entire list of domain known to the library? Etc. etc.

My point is that the original design philosophy (explicitly stated in
Aldor) was that domains should be made self describing only when they
needed to be.

On Tue, Nov 18, 2008 at 12:03 PM, Ralf Hemmecke wrote:
>
> Suppose you do something like
>
> if D has with {+:(%, %)->%} then x := foo(a + b) else x := foo(0);
>
> That is a very unreliable program the only thing at that moment
> one knows about the +$D in the 'then' branch is that there is a
> function in D that is called +. No properties are connected to it.

Since 'with {+:(%, %)->%}' is an anonymous category and by definition
one anonymous category is never equal to any other anonymous category,
I also think this construction is very bad.

> You cannot even tell whether
>
> if D has with {+:(%, %)->%} then x := foo(b + a) else x := foo(0);
>
> does the same thing. (I exchanged a and b.) There is no *knowledge*
> that + must be commutative. If there were
>
> if D has AbelianMonoid then ...
>
> that would be a bit better. But only a bit, because at the moment it is
> only a *convention* that the + in implementation of AbelianMonoid is
> commutative.

In spite of the fact that it is "merely" a design convention, I think
it is *lot* better to write it this way. The name "AbelianMonoid"
means something in the context of the Axiom library, '+:(%, %)->%'
does not.

> But AbelianMonoid is just an identifier that I could also have called
> AbelschesMonoid. Or maybe I should use some Chinese variant
> or simply call it Foo (same documentation as the one for
> AbelianMonoid).

That is why Hyperdoc is an integral part of Axiom. It does not make
sense (except in very exceptional circumstances) to use Spad to write
code in isolation of the library. The library represents a large
database of convention that is important to the correct representation
of mathematics in Axiom.

>
> Until Axiom has axioms that can be formally expressed in the
> language (instead of just in the documentation) it is only "safe by
> convention" to use "has".
>

I disagree. There are different definitions of "safety". Making it
possible for Axiom to test axioms and possibly to use axioms to
improve code-generation is certainly interesting, but it is not
essential.

Regards,
Bill Page.

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