I have just read an article talking about quantum physics. One interesting thing is that in a Haskell programmer's view there are some similarities between these two fields.
First of all, measurement in the quantum world seems similar to lazy evaluation in Haskell: if you do not measure, you don't know whether the cat is living or dead. If you do not evaluate, you don't know whether the value is defined or undefined
.
Second, in quantum we have the EPR paradox, which can be explained by interactions with speed higher than light, or equivalently, a time machine. In Haskell, as we have seen in Assembly: Circular Programming with Recursive do -Monad.Reader issue 6, we can access a value that came from the future by use of recursive do
.
Finally, in quantum we have to distinguish the observable world in which entropy never decreases, and the "pure" quantum world in which time is equivalent in both directions. In Haskell we have the IO()
world that describes what the program actually does, and the pure functional world that never has side effects, and the values never depend on evaluation order.
So I guess the above facts suggest there are some inter-connections between these two fields. Can this have more interesting consequences? For example, although I have talked about the EPR paradox, I don't know how to create a Haskell program to simulate this: a function creates two values, and later evaluation of one of them will affect the other (I think those values must have IO()
types but I don't know how to put them together).