[Aldor-l] exports and constants

Antoine Hersen antoine.hersen at gmail.com
Mon Jul 24 16:54:45 EDT 2006


On 7/24/06, Bill Page <bill.page1 at synthesis.anikast.ca> wrote:
>
> On July 24, 2006 1:09 PM Gaby wrote:
> > ...
> > Bill Page wrote:
> > |
> > | Ok. Do you still think that it is appropriate to try to use
> > | the term "dynamic type" in the discussion of Aldor semantics?
> >
> > Even in the context of dependent types, the phrase "dynamic type"
> > makes sense, just as static type does.
> >
>
> Could you define for me what you mean by "dynamic type"?
> I think the usual definition involves type checking during
> run time.
>
> Since Aldor is statically typed how can we define this in a
> useful way in Aldor?
>
> Should we say something like this?
>
> The "dynamic type" of Y is
>
>    Join( x for x in Category where Y has x)
>
> But then dynamic type would be just type satisfaction as I
> said earlier, no?


My understanding as show by the example in my previous post.

Dynamic type :=
in the scope a variable can change type
ex :
a := 10
a := "ten"
is ok

Static type :=
Variable can not change type
a := 10
a := 20
but not
a := "thirty"

We associate static type and compile time because it is usually possible to
decide all the variable type during compilation which is a blessing for
optimisation and of course detecting type error.

But Aldor has type as first class and dependent type which make type not
decidable at compile time.
But it is still static that is if a variable is assigned some type it could
not change.
This is why you can only use "==".

I think this make type checking during the compile time a bit more difficult
but still possible( I could try to elaborate but that will be pure
speculation).
But you can always trick the program with destructive function.

I think the confusion is between run time and dynamic.

Am I clear ?

Regards
Antoine Hersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.aldor.org/pipermail/aldor-l_aldor.org/attachments/20060724/f0cf6606/attachment-0001.html>


More information about the Aldor-l mailing list