[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Aldor-l] [Axiom-developer] Re: exports and constants
From: |
Page, Bill |
Subject: |
RE: [Aldor-l] [Axiom-developer] Re: exports and constants |
Date: |
Thu, 27 Jul 2006 10:22:08 -0400 |
On Thursday, July 27, 2006 9:51 AM Tim Daly wrote:
>
> Reflection involves inspecting the internal details of a
> program. A reflection domain would be able to look into other
> domains for details. A reflection domain would export a set
> of methods like fetchSignatures.
>
> So how would REFLECT get this information? ...
Well obviously the compiler has this information when it
compiles the program but it throws most of it away after the
compile is done. Since in Aldor types are first order objects
it is not necessary for the compiler to do this. All of the
data generated during the compile could in principle be
present and available as constants to the routine itself
and to other functions.
When I wrote:
-----------
MyDom: with
exports:Generator Category
add2:(MyDom,MyDom) -> MyDom
sub2:(MyDom,MyDom) -> MyDom
neg: MyDom -> MyDom
== add
import from Integer
Rep == Integer
exports:Generator Category == generate
yield with {add2:(MyDom,MyDom)->MyDom}
yield with {sub2:(MyDom,MyDom)->MyDom}
yield with {neg:MyDom->MyDom}
...
the constant 'exports' contains a representation of this
routine's actual exports (minus the 'exports' constant it
self since that would lead to infinite recursion). As Aldor
exists right now - and apparently explicitly by the intention
of the language designers as implied in section 7.1 of the
Aldor Users Guide - it is necessary to add the "reflection"
information manually to the code. But of course the compiler
could very easily automatically generate these reflective
type constants.
One very simple thing that one could do without modifying the
Aldor compiler itself would be to use a simple source text
preprocessor to modify the Aldor source code a little before
compilation to insert this extra reflection information.
Regards,
Bill Page.
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, (continued)
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/26
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, root, 2006/07/26
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/26
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Gabriel Dos Reis, 2006/07/26
- RE: [Aldor-l] [Axiom-developer] Re: exports and constants, Page, Bill, 2006/07/26
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, root, 2006/07/26
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Christian Aistleitner, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, root, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, root, 2006/07/27
- RE: [Aldor-l] [Axiom-developer] Re: exports and constants,
Page, Bill <=
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Gabriel Dos Reis, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/27
- RE: [Aldor-l] [Axiom-developer] Re: exports and constants, Page, Bill, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, root, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/27
- RE: [Aldor-l] [Axiom-developer] Re: exports and constants, Page, Bill, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Gabriel Dos Reis, 2006/07/27
- Re: [Aldor-l] [Axiom-developer] Re: exports and constants, Ralf Hemmecke, 2006/07/27
- [Axiom-developer] non-reflection, Ralf Hemmecke, 2006/07/27