2 ms·
For me, I think the answer to this is really that Haskell is pure and immutable. Equational reasoning[1] is immensely useful when debugging. It isn't unusual t
by harpocrates 10y ago
For me, I think the answer to this is really that Haskell is pure and immutable.
Equational reasoning[1] is immensely useful when debugging. It isn't unusual to debug pieces of Java code that look like this.
MyClass c = new MyClass(..);
c.method1(..);
c.method2(..);
c.method3(..);
assert(c.someField == ..) // fails!
To figure what went wrong, you have to read through all three methods and depending on whether you have dynamic dispatch coming into play, you might need to read through _multiple_ versions of all three methods.
[1]: http://www.haskellforall.com/2013/12/equational-reasoning.html http://www.haskellforall.com/2013/12/equational-reasoning.ht...