Martin D Kealey wrote:
But if you have objects and nested functions, the exact inference rule gets a whole lot more complicated. With exceptions, threads and co-routines it's a nightmare. In the general case, if your language has both pure and impure functions, proving (at compile time) that something is not impure is an NP-complete problem.
Worse it's equivalent to the halting problem (I.e., not solvable). In general any non-trivial
property of a program of the form "Does this program ever do ..." is equivalent to the halting problem. Mark Biggar -- m...@biggar.org mark.a.big...@comcast.net