3 ms·
The truth is that Lisp is not the right language for any particular problem. Rather, Lisp encourages one to attack a new problem by implementing new languages t
by asperous 13y ago
The truth is that Lisp is not the right language for any particular problem. Rather, Lisp encourages one to attack a new problem by implementing new languages tailored to that problem. Such a language might embody an alternative computational paradigm [...]
This is pretty much the reason I choose not to use lisp in my projects. I choose languages that have common programming idologies built into them because (a) I am not a language paradigm designer and don't have time for that and (b) I want other people to be able to quickly look at my code and using their pre-existing knowledge of the language idologies be able to make sense of it.
I write code for people to read (in a format machines can parse and run), and idiots (like myself) are my target platform.
You could use Lisp for everything, just like you could walk anywhere or build a bike yourself, but why would you when you could just pick out a car and just accept the limitations and dangers of driving on the roads? At least with a car you have the years of engineering and research under the hood, and mechanics that have worked on machines like yours before.
- lispm 13y agoThat was aimed at students. Once Lisp gets applied to a domain, we get ready-made libraries, syntax-extensions, etc. If you program Emacs, you don't start with a blank copy of Emacs Lisp, but a huge library and a huge amount of built-in stuff. That's all documented and there are common ways how to use and program in Emacs Lisp. Sometimes developers stay near Lisp (like in Emacs and Emacs Lisp), sometimes the end result uses Lisp, but in a different language on top. What you learn from Lisp, is for example that macros can extend the language and that there are common idioms how a macro should look&feel. But instead of a completely new language (Perl, Python, Lua, Ruby, Basic, Bash, Rebol, Abap, Groovy, Javascript, ...), with a new syntax ('C-Like', 'Java-Like', 'Pascal-like', ...), a new runtime, a new interpreter, new libraries - instead of that we get a Lisp with some extensions (macros, functions, data structures, s-expressions, ...).
- pavelludiq 13y agoYou have taken a statement that essentially means "Lisp is a pretty good general purpous language" and interpreted it as "If I use lisp I have to create the universe from scratch in order to make an apple pie, and others will have to rediscover all of physics to exist in my universe". Common Lisp, Clojure and Racket all have at the very least a descent set of libraries. And if you use clojure or ABCL, you get all of the jvm libraries too. With FFI you can use any C library from Common Lisp or Racket too. On top of that you get to use languages designed for extensibility, which means that there are actual best practices and examples of how to extend a language without painting yourself into a corner with an unmaintainable mess. Lispers have been doing stuff like this for decades, some of it is very well understood in the various lisp communities. My favorite example of this power are the various sql DSLs, I can write in lisp something like (query (:select :* :from 'some-table :where ...)) without having to concatenate strings and worry about injections. Yes, I have to learn a new language on top of Common Lisp to use it, but if you know SQL and Lisp, you already know 90% of it. Now I have all the power of lisp in my queries, isn't that cool?
- Derbasti 13y ago> You could use Lisp for everything, just like you could walk anywhere or build a bike yourself, but why would you when you could just pick out a car and just accept the limitations and dangers of driving on the roads? At least with a car you have the years of engineering and research under the hood, and mechanics that have worked on machines like yours before. Because using your car all the time will make you fat and lazy, while riding your bike will make you fit and agile. Fun fact: Both bicycles and Lisp are some of the most developed technologies out there. Bicycle technology is actually much more advanced than cars in terms of maturity and efficiency. Really, you provided a great metaphor why you in fact should use Lisp. But the, I did build my own bike, do not own a car, and love Lisp. So go figure.