Why is determining if a function is pure difficult?
问题 I was at the StackOverflow Dev Days convention yesterday, and one of the speakers was talking about Python. He showed a Memoize function, and I asked if there was any way to keep it from being used on a non-pure function. He said no, that's basically impossible, and if someone could figure out a way to do it it would make a great PhD thesis. That sort of confused me, because it doesn't seem all that difficult for a compiler/interpreter to solve recursively. In pseudocode: function isPure