[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Unions in Spad
From: |
Gabriel Dos Reis |
Subject: |
Re: [Axiom-developer] Unions in Spad |
Date: |
13 Jul 2007 03:45:02 -0500 |
Stephen Wilson <address@hidden> writes:
| Stephen Wilson <address@hidden> writes:
|
| > > so if you write
| > >
| > > inj (n : Integer) : % == [n]
| > >
| > > as above, that should be a type error.
| >
| > On the contrary, it is a call to:
| >
| > construct : Integer -> %
| >
| > which is well typed.
|
| Sorry. Again it is late. Spad will perform automatic coercions for
| you from type Rep to type %, which is clearly the key point here.
| Often there is no need for `rep' and `per' as in Aldor.
However, many times I've come across to bugs in the Spad compiler
either unable to perform that automatic conversion, or that automatic
conversion seriously confuses it. Note also that if an operation
is defined on both $ and Rep, then on takes precedence. That choice
should be left to the user, who knows what he/she intended.
Therefore, I see a need for per and rep. In fact, in my local
tree I have both per and rep -- but unlike Aldor, they are not
macros: they are built-in operators. Ideally, I would like to
see pretend uses close to zero.
-- Gaby
- Re: [Axiom-developer] Unions in Spad, (continued)
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/15
- Re: [Axiom-developer] Unions in Spad (Correction), William Sit, 2007/07/13
- Re: [Axiom-developer] Unions in Spad (Correction), Stephen Wilson, 2007/07/13
- [Axiom-developer] Re: keyword arguments, was: Unions in Spad (Correction), Martin Rubey, 2007/07/14
- Re: [Axiom-developer] Re: keyword arguments, was: Unions in Spad (Correction), Bill Page, 2007/07/21
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
- Re: [Axiom-developer] Unions in Spad,
Gabriel Dos Reis <=
- rep, per, Rep in SPAD/Aldor, was: Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: rep, per, Rep in SPAD/Aldor, was: Re: [Axiom-developer] Unions in Spad, Gabriel Dos Reis, 2007/07/13
- [Axiom-developer] Re: rep, per, Rep in SPAD/Aldor, Ralf Hemmecke, 2007/07/13
- [Axiom-developer] Re: rep, per, Rep in SPAD/Aldor, Gabriel Dos Reis, 2007/07/14
- [Axiom-developer] Re: rep, per, Rep in SPAD/Aldor, Ralf Hemmecke, 2007/07/14
- Re: [Axiom-developer] Re: rep, per, Rep in SPAD/Aldor, Gabriel Dos Reis, 2007/07/14
- [Axiom-developer] Re: [Aldor-l] rep, per, Rep in SPAD/Aldor, Christian Aistleitner, 2007/07/14
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/08