5 ms·
I'm pretty sure the biggest reason it hasn't caught on is the syntax. http://jordi.platinum.linux.pl/piccies/lisp.png http://jordi.platinum.linux.pl/piccies/li
by jordigh 10y ago
I'm pretty sure the biggest reason it hasn't caught on is the syntax.
http://jordi.platinum.linux.pl/piccies/lisp.png http://jordi.platinum.linux.pl/piccies/lisp.png
It's the most frequent complaint uttered against Lisp for a reason. All of the other things mentioned in the top responses are addressed by modern Lisp variants. If Rust or Swift were implemented with sexps and everything else about them were equal, they would have a lot of difficulty winning hearts and minds.
- mdpopescu 10y agoAgreed, but it's not just the parentheses - "car-or-zero"? Really? If you have a language where you can say "at least it's not APL", that's not a feature...
- hga 10y agoThat's where Common Lisp's roots that go back to the first version that ran as subroutines to punched card FORTRAN on a vacuum tube IBM computer show. Contents of Address and Decrement Registers -> car and cdr, for normal list processing they're often renamed or aliased first and rest. BUT, they hang around because of old code, and they're composable, e.g. the 2nd Lisp Machine design and first to be semi-mass produced was the CADR, as in (car (cdr list)), or (first (rest *list)), is in the 2nd item in the list. So, yeah, if you don't want to have to learn a lot of arcane stuff that's incidental complexity purely because of history, go for newer dialects like Scheme and Clojure which had the opportunity to rationalize a lot of this (but Scheme at least still has cadr and company because they're too useful).
- mdpopescu 10y agoOh, I know the history, I just dislike "because we've always done it this way" as a rule. Imagine having a code full of "moo x > 5", with "moo" instead of "if" because that was the sound made by the favorite pet of the initial programmer...
- pjmlp 10y agoUsually people that complain, don't spend time counting the amount of times () [] {} appear on their beloved programming languages. print(args) => (print args) if (cond) { exp1} else {exp2 } => (if (cond) (exp1) (exp2)) array[index] => (index array) And so on. On average there is probably the same amount, but visually it kind of appears to be more.
- thiht 10y agoYou took the examples where the number of parentheses is the same. Here is a more honest example: if (a && !b) {expr} => (if (and (a) (not b)) (expr)) That's a simple expression and I'm not even sure I managed to match the () correctly
- escherize 10y agoI agree it's hard to write lisp without a proper editor. Having seen the light I just can't go back now. The power, ease, and simplicity are not something I've experienced with non lisps.
- jordigh 10y agoI don't know much about Lisp, but at ILC 2014 [1] there were about 40 participants. In a show of hands, absolutely all of them used Emacs to write their Lisp. I've never seen Emacs unanimity anywhere else. -- http://ilc2014.iro.umontreal.ca/ http://ilc2014.iro.umontreal.ca/
- escherize 10y agoIncedentally I also use Emacs for editing lisp. (emacs lisp and Clojure.) Learning the hotkeys/concepts behind structural editing of lisp code was life changing metamorphasis, but quite difficult overall. There's been some fantastic work done by the Parinfer [1] team to bring the awesomeness of structural editing of lisp to the masses. The basic idea is that your parenthesis should infer where they belong by way of your indentation. I installed Parinfer it on my project: CLJSFiddle[2], and it's not what I'm used to and doesn't have everything but for a novice it is highly usable - check it out! [1] https://shaunlebron.github.io/parinfer/ https://shaunlebron.github.io/parinfer/ [2] http://cljsfiddle.com http://cljsfiddle.com
- DonaldFisk 10y agoThe point being made in the image is that experienced Lispers don't notice the parentheses. They look at the indentation. Lisp doesn't really have a syntax. If you want something which looks more like Python or C, you can either rewrite read, or use read macros. This has been attempted several times (Lisp 2, CGOL, Dylan), but in the end, the parentheses won.