[Aldor-l] parametric types and instantiation (was: Re: Should this "parser" work?)
Christian Aistleitner
tmgisi at gmx.at
Thu Oct 26 05:49:34 EDT 2006
Hello,
On Wed, 25 Oct 2006 16:58:08 +0200, Gabriel Dos Reis
<gdr at integrable-solutions.net> wrote:
> "Christian Aistleitner" <tmgisi at gmx.at> writes:
>
> [...]
>
> | > My understanding of it, from working on programming language that
> | > supports both OO and parameterized type is that when you have a
> | > parameterized domain definition c
> | >
> | >
> | > Domain(t : Type) == ...
> | >
> | > calling Domain with argument, say, Integer, is an instantiation of
> the
> | > Domain with type Integer.
> |
> | Bear in mind, that Martin's Atom is _not_ a function. Atom is a plain,
> | constant domain.
>
> That is *irrelevant*.
Ok, then forget about the rest. Let us stick to constants.
I assume you followed the thread and know about the main problem (as
otherwise your postings would be completely out of context and I am sure
you would not post such “out of context” messages).
The main problem (to me) is that Martins seems to differentiate between
“Atom" and “instance of Atom”, which can be seen by the lines
00003000: Atom
00003001: an instance of Atom
of the message at
http://www.aldor.org/pipermail/aldor-l/2006-October/000502.html
.
As Atom is just some, constant domain, let us replace it by
MachineInteger, which everyone on aldor-l probably knows better.
I call the data at memory location
(MachineInteger pretend MachineInteger)
MachineInteger. Because that's what its name MachineInteger suggests.
34 and 35 are what I call “instances of MachineInteger”.
That's what I am used to, coming from OO.
As the word “instance” is typically defined as “an occurrence” in everyday
life, it also matches this definition.
If I am correct, you follow Martin's opinion, saying besides
MachineInteger, there is also an “instance of the domain MachineInteger”.
I have not yet seen any evidence for such a separation. Can you provide
Aldor code, references to the AUG underpinning your opinion or explanation
how you think, things are working?
What is 34 called in your terminology?
“instance of a instance of the domain MachineInteger”?
As you tell me, that the difference between “MachineInteger” and “instance
of MachineInteger” is important, they cannot coincde, as otherwise the
difference would not be important and we would identify “MachineInteger”
with their union.
Furthermore, if there would be only one “instance of MachineInteger”, the
separation between them would again be not important, hence you seem to be
saying there is more than one “instance of MachineInteger”.
When are these instances created?
How are they used?
How to they interoperate?
Does (34 at MachineInteger) always give an instantce of the same instance of
MachineInteger?
Kind regards,
Christian
More information about the Aldor-l
mailing list