[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small time coding [Was: Re: About Visual Basic [Was: Industry versus academia]]
At 4:04 PM -0500 3/12/03, Bob Cassels 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
>>That's excellent. It's interesting how few languages do this.
>Dylan did it... 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
More precisely, Dylan allowed the programmer to make the trade-off:
- If you want to generate better code (e.g., compiler does method
dispatch at compile-time), you could "seal" classes or functions.
- If you want easier development or more extensible libraries, you
don't bother sealing.
Knowing exactly when to seal requires practice...