3 ms·
Sadly, the vast majority of coders never make it to "a significant amount of Lisp". Most who do tend to be very positive about Lisp, so it's not that the langua
by rtfeldman 14y ago
Sadly, the vast majority of coders never make it to "a significant amount of Lisp". Most who do tend to be very positive about Lisp, so it's not that the language veterans give it a bad word-of-mouth reputation. Quite the opposite.
There is clearly an "approachability problem" to Lisp, and it seems worth trying to solve. (If nothing else, the more popular a language gets, the more opportunities you will have to get paid to write in it for a living.)
Parens come up every single time the word Lisp is mentioned in "mixed company"--that is, both Lispers and non-Lispers. It's not just the most common complaint about the language, but the dominant complaint. (Thought experiment: What's the #2 complaint newbies make about Lisp? And how much longer did it take you to answer that question than #1?)
Originally John McCarthy had intended to use M-Expressions for Lisp, e.g. "car[cons[(A . B); x]]", but programmers preferred the parens-and-whitespace of S-Expressions instead, so they became the default.
There's no reason to dismiss the possibility of another such evolution, again based on nothing more than programmer preference.
No matter how familiar or useful you might find the existing approach, it's always possible that it can be improved.
- ScottBurson 14y agoThere have been many attempts to solve the approachability problem by creating alternate syntaxes. Vaughan Pratt's CGOL, written almost 40 years ago, was perhaps one of the best. Although these alternate syntaxes may be helpful to newcomers, they have never caught on. Expert users actually prefer the parenthesized form; so anyone working in Lisp for very long has to learn to deal with it -- and usually, once they do, they find it preferable. You said it yourself: programmers preferred S-expressions, so they became the default. The other important point here is that the non-Lispers are right, in a sense: editing Lisp without a paren-counting editor is just as tedious as one would expect. But with a paren-counting editor -- and even better, with something like Paredit that keeps the parens balanced at all times -- editing actually becomes easier, more fluid, and more pleasant than in other languages. That is why expert Lisp users prefer the parens.
- erichocean 14y agoediting Lisp without a paren-counting editor is just as tedious as one would expect That's the real barrier, IMO. Who wants to switch editors just to learn a new language with an (apparently) impoverished syntax?
- ScottBurson 14y agoHmm. How many editors people actually use these days don't have a usable Lisp mode? I don't think your choices are limited to Emacs anymore. I'm fairly sure Vim has one; I don't know for sure, but would be very surprised if Eclipse didn't; not sure what else people are using. If it really is the case that all Lisp needs to really take off is editor plugins for IntelliJ IDEA and Visual Studio -- hmm -- maybe we should do that.
- wonderzombie 14y agoI'm sympathetic, but I think the approachability problem says more about programming culture than it does about parens. People optimize for the ease-of-use case (read: syntax) over factors which have much more fundamental implications throughout the lifetime of a piece of software. I mean, learning syntax is really not where we spend most of our time while writing software, right? All else being equal, the amount of time it takes to learn new syntax is orders of magnitudes less than the time you spend, in aggregate, finding and fixing bugs. So it's a misguided trade-off, and (fortunately or unfortunately) I don't think swapping square brackets for parens (or whatever) is going to change people's preferences for what looks and feels easiest for them.
- ken 14y ago> Thought experiment: What's the #2 complaint newbies make about Lisp? And how much longer did it take you to answer that question than #1? I'm not sure what you're getting at, but the perennial #2 complaint is "There aren't any libraries!", and my response is typically the same (exasperated) answer as for #1: "You've written maybe 10 lines of Lisp in your life -- I've written several orders of magnitude more than that, and I can say that it's simply not an issue, and I wish the libraries we had in $(MAINSTREAM_LANGUAGE) were as high quality". (I admit I am not a very good ambassador for Lisp.) #3 is always "Who's going to maintain it?", at which point I remind them that more than half the team they've hired didn't know $(MAINSTREAM_LANGUAGE) when they started here, either, so apparently learning new languages isn't a showstopper. There is no #4, because at this point they usually stop talking to me, and get that "He's one of those weird Lisp guys" look on their face, and politely make it clear that regardless of how many objections I can answer, Lisp will never be used for anything except Emacs.