On Oct 13, 2008, at 4:17 PM, Waldemar Horwat wrote:

> Brendan Eich wrote:
>> True enough -- but even without normalization, multiple equivalent  
>> (at
>> runtime, depending on flow) annotations could be allowed. Should  
>> they be?
>
> No.  Just because the type matched the last five times you evaluated  
> it doesn't mean that it will match the next time.  Also, with  
> multiple lets it's too easy to mistake the case of shadowing (when  
> multiple let declarations are in nested blocks) with sharing (when  
> they are far apart in the same block).  You might refactor: ...

Same could happen for function definitions nested in blocks,  
refactored to erase the blocks. It would be an error to redefine a  
function with the same name and any type annotations (assuming we have  
annotated functions -- function types), I take it?

If the answer is no, then I agree. The consequences of runtime types  
have not been something I've thought a lot about, but it seems like  
they make all binding forms like const: you cannot redefine a name in  
the same block with any binding form.

/be
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to