> if you can measure how much time a computation takes, then Haskell is impure
gettimeofday requires IO, so the computation would depend on dynamic inputs, but that doesn't make it impure. If the program knows how long one of its computations took, that's only because an oracle (outer layer of abstraction) told it.
> Another problem with seeing purity as fundamental is that our physical reality isn't a persistent data structure
I like this line of reasoning, but would take the opposite conclusion. The universe is symmetric with respect to time, and indeed, information is conserved. Past states aren't easily accessible, but they have not been erased. This sounds like a fine working definition for persistent data structures.
> there's a strong suspicion that the (pure) type signature of runST has no pure implementation
Interesting, thanks for bringing it up!
gettimeofday requires IO, so the computation would depend on dynamic inputs, but that doesn't make it impure. If the program knows how long one of its computations took, that's only because an oracle (outer layer of abstraction) told it.
> Another problem with seeing purity as fundamental is that our physical reality isn't a persistent data structure
I like this line of reasoning, but would take the opposite conclusion. The universe is symmetric with respect to time, and indeed, information is conserved. Past states aren't easily accessible, but they have not been erased. This sounds like a fine working definition for persistent data structures.
> there's a strong suspicion that the (pure) type signature of runST has no pure implementation
Interesting, thanks for bringing it up!