[Aldor-l] exports and constants
Christian Aistleitner
tmgisi at gmx.at
Mon Jul 24 04:05:35 EDT 2006
Hello,
On Mon, 24 Jul 2006 04:33:34 +0200, Bill Page
<bill.page1 at synthesis.anikast.ca> wrote:
> In Aldor when we write:
>
> X: CatX
>
> it means explicitly that the type of X is CatX. And we are
> saying that it is the compiler's job to check (at compile time)
> that this is necessarily always the case.
>
> But 'X has CatA' is something different. I think Christian
> referred to it earlier as something like the "dynamic type"?
> But in the Aldor User's Guide this is just called
> "type satisfaction".
But I suppose, the reason for the whole discussion is that Aldor does
simply refer to types. Aldor follows the "types on variables approach".
And "values are not normally self-identifying" (which hopefully means
something like "values are normally not self-identifying"). So data has no
type on its own--normally.
Assume Domains are not self-identifying. The whole "has" thing would
collapse. Because "has" does test on the data, not the type of the
variable referring to the data.
So domains have to be self-identifying.
Therefore, in a statement
A: B == C;
we have to separate between the type that A is defined to have (which is B
-- due to the "A: B") and the type of the value of A (which is the type of
C -- due to A == C).
During my education, I've been given the terms "static type of X" to refer
to the first concept and "dynamic type of X" to the later concept.
Yes, these two terms are important for type satisfaction. But I do not
think, "dynamic type" is just called "type satisfaction" in the Aldor user
guide. Type satisfaction typically acts on the static type of both,
participing entities. (In the example above A's static type (which is B)
has to met by C's static type. Not "dynamic type at all.)
"static type" and "dynamic type" may coincide, but do not have to.
--
Kind regards,
Christian
More information about the Aldor-l
mailing list