3 ms·
Few points should be mentioned here, mostly because [non]strictness and dynamicity are not the same. Tunable strictness is already there for languages that use
by wruza 10y ago
Few points should be mentioned here, mostly because [non]strictness and dynamicity are not the same.
Tunable strictness is already there for languages that use type inference (and nontrivial type system in general). Haskell, Terra, Julia to name a few. In terra you even have two separate worlds and the border is strict; static side doesn't poison dynamic side. Otoh, in haskell once you fix a type, all calls are specialized, so careful typing must be applied even for cases that really never happen.
Dynamicity is the other beast. Dynamic code is not one that was written in dynamic language, but one that uses dynamic approaches to the problem. Metaprogramming, functional programming, complex dispatch programming cannot be converted into efficient code without providing special hints to the compiler (iow writing c++ code). Even jits usually give up on meta paths and provide little-to-no benefit there. So in general we can't convert really dynamic code to its efficient static representation. Otoh, if the code is not so dynamic, then type inference will do everything right for it, no type magic needed.
Edit: I forgot to add julia's details, quick intro is here: http://stackoverflow.com/questions/28078089/is-julia-dynamically-typed http://stackoverflow.com/questions/28078089/is-julia-dynamic...