5 ms·
Common Lisp has: generic functions, homo-iconic macros written in Common Lisp, reflection, multiple dispatch, closures, optional typing, correct implementation
by drmeister 8y ago
Common Lisp has: generic functions, homo-iconic macros written in Common Lisp, reflection, multiple dispatch, closures, optional typing, correct implementation of lexical scope, dynamically scoped variables, a metaobject protocol, conditions & restarts, and a compiler that is available for customization. One or a few of these have made it into other languages in some form or another - but not all together.
Common Lisp also has an excellent package manager (quicklisp/ASDF) a programmers IDE (emacs/slime vim/vlime), interoperation with C libraries (CFFI) and lots and lots of libraries that don't need to be constantly updated to keep them working because the underlying language changes.
I wouldn't call it just a slightly more powerful weapon.
Just the macros - my goodness - in Common Lisp you can write programs that write programs! It's easy and organic and elegant because they are written in the same language as everything else. Macros let you write code that customizes itself and optimizes itself at compile time for specific use cases. You can escape the drudgery of writing similar code over and over again. You kind of need s-expression syntax for macros to be easy to write - so no other language with complex syntax will ever have them like Common Lisp does.
Languages are all Turing complete - we can do everything in every language - but for the kind of hard problems that I want to solve, only Common Lisp has helped me out of the Turing tarpit. Also, C++ is a great domain specific language for creating tables of cache friendly compact data structures and it has great compilers.
- flavio81 8y ago>Just the macros - my goodness - in Common Lisp you can write programs that write programs!! ... and at runtime OR compile-time (your choice!) ... and by using plain, simple Common Lisp; no special, cumbersome AST-transformation libraries needed!
- oblio 8y agoAt least optional typing and macros are not considered to be universal benefits for programming. Having a ton of features has been proven in many occasions to be counterproductive. Paradox of choice, higher learning curve, etc.
- flavio81 8y ago>At least optional typing and macros are not considered to be universal benefits for programming. That's just your opinion. >Having a ton of features has been proven in many occasions to be counterproductive. Paradox of choice, higher learning curve, etc. Ok, let's see you need to get the numerical value of several big integrals. You have two choices: a. Pen and paper plus calculator. b. Computer with sophisticated computer algebra system Learning curve in (b) is way higher. Alternative (b) is also way more productive. Helicopters have also a steeper learning curve than cars. >At least optional typing and macros are not considered to be universal benefits for programming. So perhaps you don't know the benefits. Lisp Metaprogramming benefits become obvious after taking the time to learn them. Optional typing dramatically increases execution speed, something that is very relevant and important in 2018.
- oblio 8y agoYou seem to be a bit too... enthusiastic about this conversation, for my tastes :) I won't go into everything cause it would take way too much time, but I have to point one thing out: > Optional typing dramatically increases execution speed, something that is very relevant and important in 2018. As compared to what? I'm guessing your assumption was that I was thinking about purely dynamic languages? Not really, I was thinking about using static languages with type inference.
- foo101 8y agoI don't understand what point is. Do you agree that Lisp metaprogramming has benefits or do you disagree with that? If you agree, then what is your point? That we should not use a powerful language because it is not popular? Or that features in popular languages are the only features worth having? If you disagree, can you elaborate what exactly about Lisp metaprogramming do you not find powerful? That would make your arguments more concrete. Otherwise you are just going around in circles stating the same opinion over and over again which is really only your opinion that many of us don't seem to agree with.
- 8y ago