Re:Should you learn C to “learn how the computer works”?
by arcticbull on Tuesday October 02, 2018 @04:30PM
(#18125433)
I'd argue that given special purpose registers exist on most platforms to support a stack, and instructions dedicated to manipulating them (x86 %sp, push, pop) that the stack is in fact a hardware concept. The heap, however, is left as an exercise to the reader.
[ Parent
| on HN ]
Re:Should you learn C to “learn how the computer works”?
by lmm on Tuesday October 02, 2018 @04:53PM
(#18125607)
> I'd argue that given special purpose registers exist on most platforms to support a stack, and instructions dedicated to manipulating them (x86 %sp, push, pop) that the stack is in fact a hardware concept.
True enough; however sometimes access to "the heap" (in C terms) will use those instructions, and sometimes access to "the stack" will not. Learning one or two assembly languages is well worth doing, since they offer a coherent abstraction that is genuinely relevant to the implementation of higher-level languages. Not so C.