3 ms·
I wonder why gradual typing isn't more common. Shouldn't we be able to have the best of both worlds?
by matheusmoreira 5y ago
I wonder why gradual typing isn't more common. Shouldn't we be able to have the best of both worlds?
- eru 5y agoWell, in some sense many languages already have gradual typing, it's just not very ergonomic. To give an example from Haskell: You can stick everything into IO, or you can be more careful with your effects. Or to give a more main stream example: Even in a language like Go, you can do lots of runtime casting (which is essentially dynamic typing), or you can try to cajole the type system into recognizing what your are doing statically. You can do the latter effort incrementally.
- lamontcg 5y agoYeah JSON parsing in statically typed languages is usually at least mildly awful.