6 ms·
> Also I'd posit that inline ASM is a lot easier to reason about in C++ than it is in Lisp, given to the rigid type structure. I believe it's also a matter of
by userbinator 13y ago
> Also I'd posit that inline ASM is a lot easier to reason about in C++ than it is in Lisp, given to the rigid type structure.
I believe it's also a matter of how these languages were designed; Lisp started out as exclusively high-level, while C++ came from C which came from Asm. In other words, the features in C++ almost all have direct mappings to how it could be done in C, and going from C to Asm is also quite direct. In contrast, Lisp -> Asm is a huge conceptual leap.
I think the much-maligned complexity of C++ is because it grew in this step-by-step fashion and exposes all these levels of abstraction so you can easily reason about the tradeoffs involved and understand the code the machine will eventually be running. More importantly, you don't have to use all of them, but this is what makes the language so flexible and accommodating to a wide audience.
(Personally I prefer C/Asm more because I don't operate at such high abstraction levels often, and when I do, the features of C++ are not a good fit for what I want to accomplish. I have used closures in C and done functional-style there, but it doesn't seem like I need to do this often enough to move to C++ or a Lisp.)
- dllthomas 13y agoLisp had close ties to ASM early on - car and cdr refer to particular parts of a register in a 1950s era IBM computer, 20 years before C existed.
- coldtea 13y agoThose are no "ties to ASM" in the sense "easy to embed ASM in this language". Those are merely implementation details of early Lisp leaking to the language naming.
- betterunix 13y agoIf that were true it would have been awfully difficult to write operating systems in Lisp, yet OSes were written in Lisp (and the companies that famously did so played a part in the founding of the Free Software Foundation).