by Crazywater · 9y ago · 0 comments
Retrofitting a type system into a dynamically typed language has never been done successfully and it's unlikely Dart will invalidate that claim.
It's really a pity, Dart could have been a game changer.
As for retrofitting a type system into a dynamically typed language, Dart had gradual typing from the beginning (with types being checked at runtime), so it's an entirely different beast from (say) Ruby or Python.
[1] http://wiki.c2.com/?SoftTyping
Not really.
How come there are plenty of dynamically typed languages that are migrating toward optionally static typing but never the other way around?
Even Bracha himself, a very strong advocate of dynamically typed languages, has felt the need to work on Strongtalk and then later, to have Dart support optional static types.
Today, we have very good type inference engines and there is really no reason to ever want to use a dynamically typed language. This is the trend, this is the present and the future.
Javascript is going to be around for a while for legacy reasons but in a few years, we'll look back at dynamically typed languages with a fond "Yeah, it was a good idea at the time but we know better now" look.
Can you provide support for this claim? Existing research [1] seems to indicate that it isn't clear-cut at all.
> Today, we have very good type inference engines and there is really no reason to ever want to use a dynamically typed language.
Type inference has its shares of issues once you're dealing with non-local type inference, subtype polymorphism or parametric polymorphism.