4 ms·
I'm starting to think that the reason Lisp has never taken off outside a minority of users is that homoiconicity is a downside for the human readers of the lang
by pjc50 9y ago
I'm starting to think that the reason Lisp has never taken off outside a minority of users is that homoiconicity is a downside for the human readers of the language; computers are happy to count brackets, but humans prefer either different types of brackets or other separators like ';' or 'newline'.
- rekado 9y agoI like Scheme, dislike noisy syntax (including semicolon and underscores) and I'm not counting parentheses. I let my computer take care of keeping the parens matched, e.g. with Emacs paredit.
- pjc50 9y agoYes, but most people seem to prefer it the other way round. This is like the "cilantro soap taste" thing, you can't say people ought to like something if they just don't.
- nothrabannosir 9y agoBrackets in lisp are like the stick shift in a car. It looks scary and dreadful to anyone who has never learned to use it. Then, it turns out to be the easiest thing about the entire endeavour, and you forget about it in all of your first 10 minutes on the job.
- allover 9y agoThat's your opinion, but I spent weeks with the Clojure book and various exercises and could honestly never get past the syntax. Because of this I have zero interest in working with a lisp day-to-day, but there are multiple C-style langs I'd be happy working with for a day-job. I think GPP is right in asserting that most people just won't ever get over it, and you shouldn't be so quick to hand-wave their opinion away.
- lebski88 9y agoI introduced Clojure to a Java shop. We took 30 Java developers from zero experience in lisp to 100% Clojure developers. I have to say that my experience agrees with the parent. People didn't struggle with the syntax after a few days. They struggled with functional programming and immutability. At least to start with. I actually found it amazing how easily people moved over and how enjoyable they found it. Out of 30 people only one didn't take to Clojure. He moved to a C# team for a while but eventually decided to rejoin and pick Clojure back up. Obviously everyone is different but this was quite a good sample.
- kazinator 9y ago> They struggled with functional programming and immutability. So, i.e., they were struggling with just the stuff in Clojure that makes it a non-Lisp. Those programmers should have been informed that there are real Lisps out there in which you don't have to do functional programming, and things are mutable.
- willismichael 9y agoOf course any true Scotsman that wants to program in a real lisp wouldn't use Clojure.
- kazinator 9y ago> true Scotsman I'm not defending a generalization against counterexamples by trying to exclude them with a moving-goalpost definition. Mutation and pure procedural programming are part of Lisp. They are part of Lisp when they are bad, and part of Lisp when they are good. I've never shifted a definition of what is Lisp to exclude or include these characteristics in order to suit an argument at hand.
- lebski88 9y agoGlossing over the "real lisp" part ;-) Struggled to start with, sure. But ultimately for me those are the best parts. Immutability particularly. It takes a few weeks learn how to solve problems again but I do think it makes things simpler and removes a nice category of bugs. Actually maybe Java interop was the best part. Without that I doubt we could have picked up Clojure. It's far less true today but this was almost 6 years ago. Back then knowing there would be a library, even if we had to quickly wrap it was essential.
- zmonx 9y agoIn my experience, that is an overgeneralization, though definitely a tempting one that is frequently encountered. That being said, I find that Prolog code is often more readable than Lisp code. An important reason for this is that Prolog supports prefix, infix and postfix operators that can be defined as part of the concrete syntax. On the level of the abstract syntax tree, all terms conform to the inductive definition, so this is only a notational convenience.
- preordained 9y agoParentheses are no issue at all...dead serious there. Use something like parinfer (easy for beginners!) or paredit, and that problem goes away right now. You won't even see the parentheses--trust me. I agree that not having other special symbols to break up the code and make easier to pick apart is kind of crappy. Enter Clojure... it elegantly supports other symbols in a non-eccentric (looking at you, Haskell) sort of way, which I find helps a lot. [] vector, {} map, #{} set...you get the idea.
- zengid 9y agoIt took me a while to understand how to read lisp, compared to a C syntax it feels inside out and upside down (read code from the bottom up and nested forms outward). But once you get it it's easy. I've also struggled with understanding header files in C++, with templates and operator overloading and all the different meanings of const. But C++ has a massive user base. My point is C++ syntax is hard to grok too. Maybe popularity is an accidental thing related to inertia and winner-take-all effects?
- flavio81 9y ago>I'm starting to think that the reason Lisp has never taken off outside a minority of users Believe me, there are many reasons why Lisp hasn't gained more traction, and little of this has anything to do with the syntax or with the homoiconicity.
- dizzystar 9y agoI think there is an over-emphasis on the parens in Lisp. Yes, they are vital, obviously, but the real magic for me is that it's consistent all the way down. The prefix notation is incredibly powerful once you get a hang of it. Consider this in Python (or any other language): a = [1, 2, 3] Now sort it. In lisp, everything is: (function [arg] ....) You've conquered the entire syntax of the language. Now we can move on to getting things done and not have to worry about order of operations, variations on the basic syntax, and so on. You can do newline type formatting with paredit and sane indentation habits, which aren't any different than other languages.
- lispm 9y agoIn Lisp not everything is (function arg ...). Take LET and LAMBDA. Both don't follow above pattern.