3 ms·
One of the operations using the same worldstate might not get executed, or the operations might happen in unpredictable order.
by goto11 7y ago
One of the operations using the same worldstate might not get executed, or the operations might happen in unpredictable order.
- gmfawcett 7y agoIn a language like Mercury where the IO states are explicit, this would be true. You can run IO in reverse in Mercury if you want: main(IO_In, IO_Out) :- print_line("This will print last", IO_1, IO_Out), print_line("This will print first", IO_In, IO_1). But in Haskell, the world states aren't accessible to the programmer. It's misleading to suggest what could happen in Haskell if you reused a world state, because it's impossible to do so.