4 ms·
> Want to bang up a quick solution, as in MVP? Use bare-bones Javascript Actually, adding the bare minimum of type annotations (fields & function signatures) a
by ahoge 11y ago
> Want to bang up a quick solution, as in MVP? Use bare-bones Javascript
Actually, adding the bare minimum of type annotations (fields & function signatures) and type casts (e.g. casting whatever you get from querySelector into the concrete type of element) results in fewer key presses, because you can auto-complete everything and because you get additional machine-assistance like call tips and type checks.
So, you'll be actually faster if you add some types. Type inference does cover quite a lot. In practice, you'll need very few annotations and casts.
This Dart demo, for example, only needed a single type cast to be fully typed:
https://dartpad.dartlang.org/e23e4d137570c652591e https://dartpad.dartlang.org/e23e4d137570c652591e