2 ms·
There's a rather nice parallel here between the real world, and coding. Pure vs impure functions, specifically. Yes, if you have a pure function, passing in the
by lostcolony 10y ago
There's a rather nice parallel here between the real world, and coding. Pure vs impure functions, specifically. Yes, if you have a pure function, passing in the same arguments and expecting a different return value is insane. However, if there are any side effects whatsoever, any reliance on state external to the function, it's perfectly sane, and in fact, expected, for the function to behave differently.