back

by emptybits·9y ago·view on hn ↗
From a purely functional programming perspective, yes.

In reality, global state may have changed. So, no.

i.e. What we refer to as "the same thing" often isn't, in a non-FP world.

1 comments
It's still insanity, unless you know what has changed or at least that something relevant is different this time.

That's not to say that insanity doesn't work sometimes.

It's not insanity. Since time invariance is more of an abstract construct than a natural occurrence, I think you all but but guarantees that the same action will eventually yield a different result.
If you expect things to turn out differently you will often be disappointed though.
That's a function of your expectations. People get sad when they don't win the lotto but they don't celebrate every day they don't get hit by a car. It's not the odds, it's the expectations that are off.