3 ms·
The immediate side-effects of any program and the processor are only to read, manipulate, and write data. Data is stored in a finite memory that all have state
by theincredulousk 9y ago
The immediate side-effects of any program and the processor are only to read, manipulate, and write data. Data is stored in a finite memory that all have states 0 and 1.
Every single thing that can be represented or manipulated by a program is just an array of 0s and 1s that are read, manipulated, and written. The values in the array are the state, and everything a program is capable of doing only moves it to a different state of memory.
Every single program ever written is a state machine, so is every microchip for that matter.
https://en.wikipedia.org/wiki/Turing_machine https://en.wikipedia.org/wiki/Turing_machine
- tuukkah 9y agoI see. I think your argument falls apart when you wave away the differences (e.g. memory) between a finite state machine, a Turing machine and an actual computer. Theoretically, the Turing machine and lambda calculus are equivalent: https://en.m.wikipedia.org/wiki/Church–Turing_thesis https://en.m.wikipedia.org/wiki/Church–Turing_thesis However, in practise, the specifics of programming languages are essential: https://en.m.wikipedia.org/wiki/Turing_tarpit https://en.m.wikipedia.org/wiki/Turing_tarpit When you include the state of the memory in the state of the state machine, the state space explodes, which is more than inconvenient. On the other hand, in lambda calculus and Haskell, you don't have to even think about state.