3 ms·
I strongly disagree. How a computer actually operates on data is the CPU's opcodes, which: 1) have no notion of what a function is, 2) are quite happy to deal
by AnimalMuppet 7y ago
I strongly disagree. How a computer actually operates on data is the CPU's opcodes, which: 1) have no notion of what a function is, 2) are quite happy to deal with global variables, 3) are perfectly willing to mutate data anywhere, 4) are willing to branch to arbitrary locations.
That's about as far from FP as you can get.
- naikrovek 7y agoAnd OOP is closer? Are you saying CPUs are object oriented? Or maybe you just latched onto the comment about FP and decided to argue against it in isolation. I am saying that CPUs are NOT object oriented and that functional programming is closer to how a CPU operates than OOP is, and therefore much easier for a compiler (and a compiler author) to reason about and to optimize.
- Jtsummers 7y agoQuestion: Which functional programming languages are you specifically referring to with that statement?
- AnimalMuppet 7y ago> And OOP is closer? No. > Are you saying CPUs are object oriented? No. > Or maybe you just latched onto the comment about FP and decided to argue against it in isolation. Yes, because it was flat-out wrong. FP is not in any way closer to how a CPU operates. (I mean, the rest of your post had problems, too, but that one bit was glaringly wrong.) > I am saying that CPUs are NOT object oriented That I will agree with.