> Statically typed functional languages like Haskell and OCaml allow much more correct code and reject much more wrong code
In functional code, sure. In a predominantly mutable algorithm, you fight the language more than what you gain, and sometimes, yes, the mutable approach is simpler and easier to reason about. Especially local mutability can be very readable/maintainable.
Re:So you're using a weird language
by neilparikh on Friday October 07, 2022 @02:37AM
(#33118115)
Local mutability is not particularly difficult in either Haskell or OCaml.
I think the ironic thing here is that these "approved" languages are both less safe and less expressive. Statically typed functional languages like Haskell and OCaml allow much more correct code and reject much more wrong code compared to something like Java or Go. I'd even go as far as to argue that in some ways, Haskell is more expressive than the mainstream dynamic languages (Ruby, Python, JS etc).
Now, if your developers are really "idiots" (which to me is a very condescending thing to assume, but that's a different story...), then maybe they won't even be able to get their code to type check in the first place and ship no code at all :)