3 ms·
Now you are aware of another, Common Lisp (as implemented by SBCL): http://www.sbcl.org/sbcl-internals/index.html http://www.sbcl.org/sbcl-internals/index.html
by betterunix 12y ago
Now you are aware of another, Common Lisp (as implemented by SBCL):
http://www.sbcl.org/sbcl-internals/index.html http://www.sbcl.org/sbcl-internals/index.html
- reddit_clone 12y agoHe did say "languages in common use". CL in spite of its name is still a bit uncommon.
- lispm 12y agothe true scotsman again?
- reikonomusha 12y agoYou should underline that the ASM part is extremely implementation dependent. There is absolutely no language feature, or even a convention, to have inline ASM. 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. You're bound to shoot yourself in the foot in Lisp, even more than in C++.
- dbaupp 12y agoInline ASM is implementation dependent in C++ too, isn't it?
- reikonomusha 12y agoYes, but the two big names in C++ compiler technology—GCC and Clang—are largely compatible [1]. This is not the case with Lisp. [1] http://clang.llvm.org/compatibility.html#inline-asm http://clang.llvm.org/compatibility.html#inline-asm
- lispm 12y agoStill it is a common feature in Lisp systems to offer inline assembler or inline C.
- userbinator 12y 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 12y 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 12y 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 12y 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).