3 ms·
I think the OP was trying to say that type theory is difficult, not that the kind of "no mutable state" idea is difficult.
by tines 2y ago
I think the OP was trying to say that type theory is difficult, not that the kind of "no mutable state" idea is difficult.
- nine_k 2y agoType theory can be complicated! OTOH e.g. untyped lambda calculus is purely functional, and lives without types. It can be easily explained using the notion of "macro", or text substitution, familiar to any C programmer. Certainly knowing some category theory helps. Finding out mathematical underpinnings of e.g. monads is some effort, and a foray into a non-daily math territory. I'd compare it with learning about matrices and quaternions when doing 3D geometry stuff. In either case, you have to make an effort and acquire a bit of special knowledge. But once you've learned it, it becomes and remains "intuitive", you don't have to think deeply or write complex formulae to use it. You just write [int(x) for x in line.split(",") if x] and don't mentally split this chain of monadic operations into an isomorphism and a catamorphism.