3 ms·
Many things I could respond to, but out of convenience I'll just note that there's a reason why nobody programs in Haskell in the Cont monad unless they really
by tel 11y ago
Many things I could respond to, but out of convenience I'll just note that there's a reason why nobody programs in Haskell in the Cont monad unless they really can't avoid it!
- pron 11y agoSure, just as there are reasons people write simple pure functions in Java when that's the best approach, and they generally try to keep things simple and tractable. Obviously, there's plenty of terrible Java code out there, but there would be plenty of terrible Haskell code out there too if Haskell had similar levels of usage. In any case, I was responding to the general statement that Haskell's purity makes reasoning easy by mere virtue of being pure. Well, LC is pure and it can be just as messy as Turing machines. Haskell code -- like Java, C, and Python code -- is simple to reason about when it is written with care (yes, I know that there are differences, but as a general rule). Now, don't get me wrong: I'm all for Clojure-style, ML-style or Rust-style immutability-by-default (each, of course, is different as they all have different tradeoffs), but that's completely separate from purity.
- tel 11y agoThat's one nice thing provable in Haskell's type/effect system, though, that the ambient effects available are no stronger than X for various descriptions of X. I know you dislike that whole regime, but it at least in this specific case explicitly circumscribes situations where, e.g., Cont is too strong.