3 ms·
I think everybody who is a programmer should learn some assembly language...not so much for code optimization, but rather to understand how the computer + compi
by mas644 15y ago
I think everybody who is a programmer should learn some assembly language...not so much for code optimization, but rather to understand how the computer + compiler work underneath the hood. You don't need to be able to write crazy advanced programs in it or even learn a popular ISA like x86 or ARM, but you should understand some simple instruction set (think of Patterson & Hennessy's undergrad textbook on Computer Organization & Design with the MIPS ISA). The point is to have some insight into how the compiler in your higher level language maps to the atomic level instructions of your computer and why certain operations are costly. For example, if you don't understand how your computer does stack management, how can you understand the overhead of a function call and the benefits of compilers inlining code? Another example for functional languages is the Funarg Problem where it is difficult to efficiently implement higher-order functions and closures in a stack-based model as found in contemporary computers. You gotta understand a little bit about it otherwise you're going to be limited in how much you can grow as a software developer.