2 ms·
> you cannot know what a monadic computation will do without running it This is not unique to monads. You cannot in general know what any computation will do
by lisper 4y ago
> you cannot know what a monadic computation will do without running it
This is not unique to monads. You cannot in general know what any computation will do without running it. That's the halting problem. Even compilers are subject to this if you have a sufficiently expressive type system (or macros).
- dustingetz 4y agothe halting problem applies to turing complete computations, which declarative computations are not.
- lisper 4y agoHuh??? The Wikipedia article on declarative programming [1] lists functional programming as a sub-paradigm of declarative programming, and Haskell and Scheme as examples of functional languages. But Haskell and Scheme are obviously Turing-complete. So I have no idea what you are talking about. [1] https://en.wikipedia.org/wiki/Declarative_programming https://en.wikipedia.org/wiki/Declarative_programming