Did you ever hear this aphorism?
No man can step in the same river twice. For the second time, it is not the same river, and he is not the same man.
Imagine one of your functions writes a 1
to /dev/ttyusb0
. In UNIX, this is "just a file", but in real life, this is actually the name of a microcontroller, and by writing a 1
it activates a bread-slicing machine and slices 500 loaves of pumpernickel. Writing a 1
the first time caused 500 loaves of pumpernickel to go from the "unsliced" state to the "sliced" state. Sending another 1
does not have this effect (because you can't go back to "unsliced"!). It's not the same river.
Imagine another of your functions reads some data from a stream. If it was a static file perhaps you could read it twice and get the same results, but if instead your stream is a data buffer from (yet another) microcontroller (this one is monitoring the baking temperature), then reading the value over and over again will give different results as the oven heats up or cools down. He's not the same man.