3 ms·
> This is the key advantage of dynamic types. You can make a computer do useful things without having to invest the large effort required to learn how static ty
by neolog 6y ago
> This is the key advantage of dynamic types. You can make a computer do useful things without having to invest the large effort required to learn how static types work.
That's one key advantage of dynamic types, but it's not the only one.
Sophisticated dynamic type systems like Julia's are difficult to model statically. Some idioms would require dependent types if they're even possible at all.
- djur 6y agoYes, there's historically been cases for dynamic typing that went beyond "writing type annotations is hard", although as time has progressed, computers have gotten faster, and compilers have gotten better, the scope has gotten smaller and smaller. (I think a language in Python's niche that was created today would have a simple type system with extensive inference, just because someone developing such a language today would find it technically feasible.) Another case is what Alan Kay calls "extreme late binding" in a messaging-oriented language, as seen in Smalltalk and Erlang.
- pansa2 6y ago> I think a language in Python's niche that was created today would have a simple type system with extensive inference How do you think a “simple type system”, suitable for a Python-like language, would look? The type systems that have been developed for Python itself, for example MyPy, are far from simple.