[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-math] What is the "+/" operator?
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-math] What is the "+/" operator? |
Date: |
Thu, 24 May 2007 11:58:42 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070326) |
Or, since we're in the realm of algebraic computation, make sure that the
functional "/" is declared to have the "right" type.
This somehow brings us back to my beef with the way Axiom currently handle
mathematical structures (the old Monoid debate).
Of course, and we should leave it at that for the moment.
Think of it this way: What does reduction "/" need to work with?
A sequence of values and operation that happens to be a monoid operation
over the element type of the list. So, assume that from the context of use,
the compiler or interpreter (it does not matter which one) can deduce that the
operation + in
"+"/[1, 2, 3]
is a monoid operation integers -- because it has seen a prior statement to
that effect. What will be wrong?
Nothing is wrong if the monoid structure can be figured out.
Just another remark about the statement above.
Even if that is common in the current SPAD code, I don't like to see
quotes around the +. Quotes should be reserved to produce strings.
You probably know that quotes in Aldor mean to call the function
string: Literal -> SomeType
So with a little work the above statement could be made litterally
working in Aldor, but for my taste I would rather like to write
(+)/[1,2,3]
since the parentheses let the + forget about its infixedness (see AUG).
Writing _+ (underscore plus) would be better, but also doesn't look very
attractive to me.
Ralf
- [Axiom-math] What is the "+/" operator?, Igor Khavkine, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Martin Rubey, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Bill Page, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Ralf Hemmecke, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Bill Page, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Gabriel Dos Reis, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Ralf Hemmecke, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?, Gabriel Dos Reis, 2007/05/23
- Re: [Axiom-math] What is the "+/" operator?,
Ralf Hemmecke <=
- Re: [Axiom-math] What is the "+/" operator?, Gabriel Dos Reis, 2007/05/24
- Re: [Axiom-math] What is the "+/" operator?, Gabriel Dos Reis, 2007/05/23
Re: [Axiom-math] What is the "+/" operator?, Gabriel Dos Reis, 2007/05/23