Re: What is the "+/" operator?

Ralf Hemmecke <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.general
Message-ID <[email protected]>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.