But the tooling and documentation aren't telling you what will happen at runtime.
> At run time you can run it in checked mode and it will always tell the truth.
It doesn't tell you the truth. A static type system is designed to rule out errors are compile time. That's what makes a static type system different from type assertions or guards.
Besides, I don't really know what "telling you the truth" means if, for example, function arguments unify under covariance instead of contravariance like they should. Whether that happens at runtime or at compile time makes no difference—it's equally wrong either way.
> This means that if you cover your code at all, manually or automatically then it will inform you of type errors.
This is always true in any dynamic language.
> How is this worse than a dynamic language that offers you no optional typing with full checking at runtime?
In JS's case we can still add a static type system that's actually sound, whereas Dart has already crossed the bridge into unsoundness.
> This means that if you cover your code at all, manually or automatically then it will inform you of type errors. >> This is always true in any dynamic language.
No, there's a difference. I will get the error in dart as soon as I try to use the object in any way. In a dynamic language I could call a few methods on it before calling a method it does not support. i.e. it behaves like a compiler would except at run-time. This makes a big difference in how quickly you can debug it and again this is only for the minority of scenarios that are not covered at compile time.
I have a serious problem with Dart's design: the type system is deliberately unsound around generics because the designers apparently think that supporting variance (which is not that difficult!) is worse than having types tell the truth. I would much rather there be no type system at all than there to be an unsound one, as I don't think compilers and IDE's should lie to you.
I think that's a mistake that the new language of the Web should not make, but Google seems unwilling to change it. Unlike JavaScript's warts, which be worked around for the most part, I don't see any way to fix a flaw that serious in the type system once Dart is stable.