Paul Moore wrote:
What "allows side effects" in languages like Haskell is the fact that the runtime behaviour of the language is not defined as "calculating the value of the main function" but rather as "making the process that the main functon defines as an abstract monad actually happen".
That's an interesting way of looking at it. To put it another way, what matters isn't just the final result, but *how* the final result is arrived at. In the case where the main function never returns, the "final result" doesn't even exist, and all you have left is the process. Philosophical question: Is a function that never returns actually a function? -- Greg -- https://mail.python.org/mailman/listinfo/python-list