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

Re: Optional types



At 05:47 PM 12/7/2001 -0500, Eric Kidd wrote:
>Well, let's start with a basic rule of thumb:
>
>   In an optionally-typed language, adding type declarations should not
>   slow down your program.

One nice thing with optional types is, if the language allows you to add 
some certainty with them (perhaps with a promise that this type or its 
subtypes are always passive data, or a native int, or something) they can 
ultimately allow execution to be sped up.

The biggest impediment to good optimization with all the dynamic languages 
is the amount of uncertainty at compile time. Anything that can reduce the 
uncertainty gives the optimizer more to chew on.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk