DEV Community

George Shuklin
George Shuklin

Posted on

The main difference between computer science and real computers is side effects

(from a comment)

The main difference between computer science models for computers and actual computers is side effects.

Side effects is what make you able to observe results of computation. There is nothing in CS which allows you to have 'an observer'. Even 'tape' in Turing machine is something you observe, it's a side effect, but it's so perfect, that it always works, there are no jams, no IO timeouts, etc, so it's accepted as perfection (it's also infinite). Same for the final state of machine, which you somehow magically 'observed'.

So, computer science study computing. And then there are real things out there doing mostly side-effects. For which 'less computation is better'. The more side effects you do (compare to the computations), the better is your program. If you can print (side effect) the answer in 1ms, your program is superior to the program which do computer science things (compute) for 1 minute before printing the same result .

No one wants computing, we want side effects. We tolerate computing only because there is no other way to make lights to blink in the proper order. https://xkcd.com/722/

So, every reasoning in CS does not really care about side effects (even if they are studied), CS is all about computing, and computer application is all about side effects.

So, there is a gap in terminology, different focus, different values, different everything. It is the reason software engineering (the computer part of it, humans aside) is so different from academia writings in any programming language (incl. programming languages itself).

Top comments (0)