4 ms·
The difference is abstraction. When you code, you're building on top of assembly / cpu registers and instructions. The fact that X86/64 runs on a bunch of elec
by TheDong 12y ago
The difference is abstraction.
When you code, you're building on top of assembly / cpu registers and instructions. The fact that X86/64 runs on a bunch of electrical fluctuations is actually inconsequential and an implementation detail.
Any x86/64 processor built of transistors naturally needs to take into account the behavior of the transistors it's made up of. But once you've gone above the micro-code/processor level, those details are fully abstracted.
Regardless what programming language you use, that is abstracted away identically and matters not.
However, the fact that registers in the process and memory locations exist and mutate is not something abstracted away from every language. It's abstracted in some, but not others, so it's valid to say that this difference is within the scope of the programming language.
That is why the argument differs. If the above isn't clear, I'd be happy to give another go at explaining it.
- Peaker 12y agoSo it's just a matter of abstracting less or more of the implementation details. In Haskell, the mutation necessary to implement pure, lazy computation is an implementation detail, just like manual memory management or quantum fluctuations.
- Rusky 12y agoOne of those implementation details is hidden away underneath the hardware interface and not visible to software. There are plenty of better examples to make this point with- named variables and functions, control structures, etc. And these make it clear that the argument is really about the importance of this particular abstraction: where and when memory is used for which values.
- Peaker 12y agoSure, I don't think it is very important where the abstraction occurs for this argument though.
- tel 12y agoBut surely you must see that this is just a choice which happens to lie favorably for the argument but is otherwise arbitrary. You could write a language which expressed manipulations of the electrical fluctuations in the same way that DNA is a programming language which expresses manipulations of ambient signaling protein levels to operate our cellular computers. Or, taken another way, GLSL is a language which shares a lot of similarity with "functional" languages (despite its C like syntax)---and it certainly doesn't run on an x86 architecture!
- asQuirreL 12y agoYes, exactly this. Different tools are good for different abstraction levels. Nobody expects people to write applications entirely in assembly anymore, because we have higher levels of abstraction, but that doesn't mean assembly is good for nothing. Assembly is a great and necessary abstraction level. Similarly, technologies in other abstraction levels are useful too. Too often I see people conflating "X is good" for "X is good for everything" when that is so rarely, if ever, true.