Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder why gradual typing isn't more common. Shouldn't we be able to have the best of both worlds?


Well, 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.


Yeah JSON parsing in statically typed languages is usually at least mildly awful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: