<br><br><div><span class="gmail_quote">On 7/24/06, <b class="gmail_sendername">Bill Page</b> <<a href="mailto:bill.page1@synthesis.anikast.ca">bill.page1@synthesis.anikast.ca</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On July 24, 2006 1:09 PM Gaby wrote:<br>> ...<br>> Bill Page wrote:<br>> |<br>> | Ok. Do you still think that it is appropriate to try to use<br>> | the term "dynamic type" in the discussion of Aldor semantics?
<br>><br>> Even in the context of dependent types, the phrase "dynamic type"<br>> makes sense, just as static type does.<br>><br><br>Could you define for me what you mean by "dynamic type"?
<br>I think the usual definition involves type checking during<br>run time.<br><br>Since Aldor is statically typed how can we define this in a<br>useful way in Aldor?<br><br>Should we say something like this?<br><br> The "dynamic type" of Y is
<br><br> Join( x for x in Category where Y has x)<br><br>But then dynamic type would be just type satisfaction as I<br>said earlier, no?</blockquote><div><br>My understanding as show by the example in my previous post.<br>
<br>Dynamic type := <br>in the scope a variable can change type<br>ex :<br>a := 10<br>a := "ten"<br>is ok<br><br>Static type :=<br>Variable can not change type<br></div>a := 10<br>a := 20<br>but not<br>a := "thirty"
<br></div><br>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.<br><br>But Aldor has type as first class and dependent type which make type not decidable at compile time.
<br>But it is still static that is if a variable is assigned some type it could not change.<br>This is why you can only use "==".<br><br>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).
<br>But you can always trick the program with destructive function.<br><br>I think the confusion is between run time and dynamic.<br><br>Am I clear ?<br><br>Regards<br>Antoine Hersen<br>