by lmilcin · 5y ago · 0 comments
Lisp isn't very popular because, at least in my opinion, it requires a relatively high level of maturity and experience to be used effectively on nontrivial projects.
Every single project in Lisp (Common Lisp, Clojure) that I have observed ended in a disaster mostly because developers could not figure out what the strengths of Lisp are to realize the benefits and then killed themselves with too much freedom.
Absent large enough number of success stories companies will default on Java because it is good enough language to be able to effectively realize typical enterprise application and dumb enough to be used by a beginner dev, even at the cost of boilerplate.
At least that's the official story. It is really difficult to explain to business that you could do whatever they want with 1/5th or 1/50th of the amount of code if you just used a good language for it.
Where I saw fellow university friends having a problem was with thinking in Prolog and computational logic.
But the overall effect is very different. For instance, simple ergonomic things that help programmers read code, like the word "else" in an if statement/expression are elided because its AST is implicit in its position in Lisp. Similarly, you can't quickly scan a page of code for something like "=" to see what's getting assigned - you have to look for let pairs.
And even then, making local variables seems to be considered wasteful in Lisp if there's a way to structure it so that the value can be placed somehow directly into the AST as the evaluation of an expression. The result is that most Lisp code I've seen has a rigidity to it of deep expressions within expressions. Deep expressions are certainly possible to implement in other languages, but it's rare to see it done so thoroughly as Lisp developers seem to enjoy doing.
The result is "hard to read" in the sense that it's harder to scan syntactically (lisp having essentially no syntax) and harder to modify due to the carefully constructed expression nesting. These may both be seen as my own shortcomings wrt the language, but I think many others share them.
Except it is.
One is just syntax you write to get compiler to emit code you can more or less predict at "write time" and the other is a data structure you can operate on and get to emit any code you want.
Most people I worked with on Common Lisp / Clojure projects never made the leap to treat the program as data structure. So it evidently is "a big deal".
The whole point of Lisp is to have your program be a data structure and then have a core language that is very good at manipulating data structures, so if somebody doesn't get it they are not really realizing benefits of Lisp and they would be better off in a poorer but more approachable language like Java.
Other languages scale smoothly from beginner to expert. So I guess that your assertion shows that Lisp is a less useful language?
Experienced programmers using non-Lisp languages are successful every day. Your OS/mobile phone/browser/… is the result of their work. So I guess other languages are better for experienced developers as well?
In other words, the real world evidence seems to suggest that Lisp is not good for beginners and not good for experienced developers.