News for hackers. Stuff that matters.
Re:Are dynamic languages going to replace static languages? ... by matheusmoreira on Wednesday August 04, 2021 @08:13AM (#28060053)
I wonder why gradual typing isn't more common. Shouldn't we be able to have the best of both worlds?
Re:Are dynamic languages going to replace static languages? ... by eru on Wednesday August 04, 2021 @08:21AM (#28060123)
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.

Re:Are dynamic languages going to replace static languages? ... by lamontcg on Wednesday August 04, 2021 @12:16PM (#28062796)
Yeah JSON parsing in statically typed languages is usually at least mildly awful.