7 ms·
"...but it also doesn't force you to adopt a paradigm. This flexibility is C++'s greatest strength, as well as its greatest weakness." Lisp is mult-paradigm al
by jimbokun 19y ago
"...but it also doesn't force you to adopt a paradigm. This flexibility is C++'s greatest strength, as well as its greatest weakness."
Lisp is mult-paradigm also. I think the difference is that Lisp has a philosophy. The paradigms fit together in a consistent way. For example, Common Lisp has an object system, CLOS. But they implemented it around generic functions, in order to keep the functional programming nature of Lisp intact.
Lisp will let you do pretty much anything. But it often gives you a "nudge" in a particular direction. I believe pg points this out in On Lisp; you can write procedural code in Lisp, for example, but the code flows a lot better if you write in a functional style.
C++ just seems like a kitchen sink language. Everything is in there somewhere. But it doesn't seem like the parts were designed to fit together in any particular way.
- timr 19y agoI agree with you about Lisp. I like Lisp; it's definitely more elegant than C++. That said, C++ was designed to be resource efficient, at a time when the best Lisp interpreters were...well...less so. So, while C++ and Lisp both have OO, functional, procedural and metaprogramming techniques (among others), C++ has made some ugly choices to achieve efficiency at the same time. For the record: I am not trying to get into a Lisp/C++ debate.