[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Unions in Spad
From: |
Stephen Wilson |
Subject: |
Re: [Axiom-developer] Unions in Spad |
Date: |
13 Jul 2007 19:57:30 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hi Ralf,
Regarding `rep' and `per'.
I see the issue as follows. Ideally, a definition of type Rep in
domain context should automatically generate two functions `rep' and
`per' (I like `inj' and `prj', for inject and project, myself) with
the familiar signatures. The compiler has special knowledge about
these functions and knows they can be applied to convert between Rep
and %. As Gaby pointed out, these can be defaults with the
possibility to override.
Spad effectively does this, so that if you have a context like `... =
[n]', then an implicit function analogous to `per' can be selected as
a form of auto-coercion to satisfy the type.
I agree that in Spad the implicit functions should be named and
available.
Note that both Aldor and Spad try hard to infer types. The draw back
in Aldor is that rep and per are macros, and thus do not carry any
useful semantic information and cannot be used by the compiler to
perform the conversion.
Take care,
Steve
- Re: [Axiom-developer] Unions in Spad, (continued)
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Gabriel Dos Reis, 2007/07/13
- 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 <=
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/08
Re: [Axiom-developer] Unions in Spad, Waldek Hebisch, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09
Re: [Axiom-developer] Unions in Spad, Bill Page, 2007/07/09