[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Re: SPAD and Aldor again
From: |
Peter Broadbery |
Subject: |
Re: [Axiom-developer] Re: SPAD and Aldor again |
Date: |
Tue, 21 Nov 2006 21:28:43 +0000 |
On Tue, 2006-11-21 at 22:14 +0100, Ralf Hemmecke wrote:
> > Rep and Per are good for many things, but it might be worth adding a
> > shorthand for 'my representation is just a record'. Don't think of Rep
> > as an instance variable - it's a mapping between your type and an
> > underlying one. That said, a default representation of Rep + Record
> > might be an interesting idea.
>
> Peter, perhaps you know ...
>
> The only thing that makes "Rep", "rep", and "per" special is:
>
> macro {
> rep x == ((x)@%) pretend Rep;
> per r == ((r)@Rep) pretend %;
> }
>
> from include/aldor.as.
>
> Now let us assume that everywhere in the libaldor sources we would replace
>
> Rep <--- Foo
> rep <--- bar
> per <--- rab
>
> I guess the compiler would still accept the code and even produces an
> identical library (up to name changes and hash codes etc).
>
Yes, correct. The fact that almost all domains require a representation
is an part of the language, even if the implementation of this is done
via convention.
> Or does the compiler know about a special treatment of "Rep" (in
> contrast to "Foo")?
>
> Going a bit further... is % known to the compiler? Or could I also
> replace that (above and in everywhere.as file) by something else like
> "Bar", for example?
>
% is a different thing to the type being defined - this matters for
add-inheritance and in categories.
Peter
- Re: [Axiom-developer] Re: SPAD and Aldor again, (continued)
- Re: [Axiom-developer] Re: SPAD and Aldor again, root, 2006/11/20
- Re: [Axiom-developer] Re: SPAD and Aldor again, root, 2006/11/20
- Message not available
- [Axiom-developer] GCL and elf-loader, root, 2006/11/21
- [Axiom-developer] Re: GCL and elf-loader, Gernot Hueber, 2006/11/21
- [Axiom-developer] Re: GCL and elf-loader, Gabriel Dos Reis, 2006/11/21
- [Axiom-developer] Re: GCL and elf-loader, Gernot Hueber, 2006/11/21
- Re: [Axiom-developer] Re: SPAD and Aldor again, Antoine Hersen, 2006/11/21
- Re: [Axiom-developer] Re: SPAD and Aldor again, Gabriel Dos Reis, 2006/11/21
- Re: [Axiom-developer] Re: SPAD and Aldor again, Peter Broadbery, 2006/11/21
- Re: [Axiom-developer] Re: SPAD and Aldor again, Ralf Hemmecke, 2006/11/21
- Re: [Axiom-developer] Re: SPAD and Aldor again,
Peter Broadbery <=
- Re: [Axiom-developer] Re: SPAD and Aldor again, Gabriel Dos Reis, 2006/11/17
- [Axiom-developer] Re: SPAD and Aldor again, Gabriel Dos Reis, 2006/11/17
- Re: [Axiom-developer] Re: SPAD and Aldor again, Ralf Hemmecke, 2006/11/17
- Re: [Axiom-developer] Re: SPAD and Aldor again, Gabriel Dos Reis, 2006/11/17
- Re: [Axiom-developer] Re: SPAD and Aldor again, root, 2006/11/17
- Re: [Axiom-developer] Re: SPAD and Aldor again, Martin Rubey, 2006/11/17
- Re: [Axiom-developer] Re: Ping: case insensitive filesystems, Gabriel Dos Reis, 2006/11/17
- Re: [Axiom-developer] Re: Ping: case insensitive filesystems, Waldek Hebisch, 2006/11/17
- Re: [Axiom-developer] Re: Ping: case insensitive filesystems, Gabriel Dos Reis, 2006/11/17
- [Axiom-developer] compiler-improvements, Waldek Hebisch, 2006/11/15