[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small time coding [Was: Re: About Visual Basic [Was: Industryversus academia]]



anton@appsolutions.com wrote:

>Christopher Barber wrote:
>  
>
>>The Curl language has optional type annotations.  Variables with
>>undeclared types are given the compile-time type of 'any', which
>>is the supertype of all other types.  Type checking involving anys
>>is deferred until runtime while that with other types is done at
>>compile time.
>>    
>>
>
>That's excellent.  It's interesting how few languages do this.
>

Dylan did it. <object> is the top type, and is the default for any type 
not explicitly specified.  The semantics are specified in terms of 
runtime type checks.  But much attention was paid to designing it so 
that compile-time type checking would be done where possible to allow 
eliding run-time checks.  Also compile-time method dispatch where 
possible.  This required that relevant functions and/or classes be 
"sealed", stating that relevant methods could not be added dynamically 
after compilation.