3 ms·
If a program has no IO it can be reduced to not running a program at all (not counting side effects like the CPU getting warmer... but I don't think we'd count
by kaoD 3y ago
If a program has no IO it can be reduced to not running a program at all (not counting side effects like the CPU getting warmer... but I don't think we'd count that as a property of the program itself).
- Etheryte 3y agoIO is a side effect, at least from the functional programming perspective.
- pjerem 3y agoYes but also in FP perspective, a program without IO will not be ran at all. Except if you count static parameter to not be an input, then you have a static output which is basically a constant. Compiler may in fact try to transform it into a constant and if you don’t do anything with it, well, it’ll probably be marked as unused and not even embedded in your binary.
- blowski 3y agoIf you have a program that sends an email with fixed content to a fixed email address, whenever you run that program that email address will receive an email. Is the email an output, or a side-effect?
- rzzzt 3y agourn:xkcd:1172
- infradig 3y agoNon-termination is a valid computation. No I/O involved.
- ReactiveJelly 3y agoIf the program doesn't take any input and your only output is termination time, you are writing an egg timer.
- Supermancho 3y ago> If a program has no IO it can be reduced Thats a difference between the theory and practice. In practice you always have to consider physics. There are always inputs and outputs.