Re:Haskell People
by yen223 on Saturday September 30, 2017 @08:26PM
(#15375746)
In a dynamically-typed language, you can't actually know if this dead-simple function will throw an exception, until you know the entire call graph leading up to where this function was called. That's fine in small scripts, but really freakin hard if you have call-stacks 10 levels deep.
[ Parent
| on HN ]
Sure, but it is both exceedingly readable and exceedingly simple. It is pretty much pseudocode. Which is what we are discussing, not type safety in huge codebases.
Thats true in small functions, but that's also true for statically-typed languages with type inference. In OCaml, the same function would also be
let add x y = x + y
Looks reasonable to me, and this is statically type-checkedIf I were making an argument in this case, I'd say that several other languages have fulfilled the "readability" benefit while also fulfilling orders of magnitude higher performance and type safety garuantees. This implicates that one case is write only instant legacy code and the other will be highly maintainable going forward if the codebase and team need to scale in size.