Hacker News new | ask | show | jobs
by canhascodez 2794 days ago
Assembly is one of the roots of computing, but so is lambda calculus. One might also argue for gates or boolean logic as fundamental concepts. Higher levels of abstraction are much, much more productive, but it's hard to compare like with like, since you are fundamentally measuring different quantities. Is a coder "faster" if their compiler generates much more code than necessary, or if they use optimizing flags to generate fewer instructions?

The point of abstraction is rarely (if ever) speed, either of coding or code execution. Abstraction is about managing complexity. It's not that one couldn't write a prime-finding algorithm just as quickly and easily either way, it's that you can't write Facebook in assembly, and if you did, you would have to reinvent a ton of features from higher-level languages. Are programmers using HLLs more productive overall? Probably: more abstract code uses fewer symbols to express the same concept. However, you lose precision. One can say, "make me a sandwich", and assuming that you have sufficient access privileges, you will likely get some kind of sandwich, but since that's a pretty high-level description, you may not get the kind of sandwich you were expecting. Most of the time, it's easier and faster to just say (e.g.) `let x = 5` than to get bogged down in the details of what that might actually mean. However, if what you really want is `mov eax, 5`, then all of the other things that your HLL might be doing may not be a net benefit.

Hopefully that thoroughly clarifimuddles the subject.