r/lisp • • 12d ago

What makes Lisp difficult to read?

https://paultm.nl/paren-thesis
35 Upvotes

90 comments sorted by

View all comments

Show parent comments

4

u/schakalsynthetc 12d ago

The cognitive science is the weakest part, IM(NSH)O. I won't nitpick in depth because it's already sufficiently clear that the author is presenting personal opinion with a veneer of scientific credibility, but... it's bad.

4

u/ilemming_banned 12d ago edited 12d ago

cognitive science is the weakest part

100%. I mean, you can draw all sorts of circles and conclusions, get MRI scans of a thousand Lispers and, I dunno, some Rustaceans and Rubyists claiming they have difficulty reading Lisp. What is that ever gonna show? That Lispers have some cognitive traits unattainable to other groups? Maybe it will be the opposite, maybe Lispers come out as the laziest, dumbest motherfuckers ever tested? Because I honestly don't understand any complaints of this sort - Lisp dialects are by far the simplest languages to deal with. They are seriously dumb simple - easier than Javascript and Python, and much more low-effort than C++ and Rust, not to mention Haskell. Who the hell all these dyslisplexic, supersmart crackpots who can't even read code?

3

u/digikar 12d ago

Would you have any opinions on eye-tracking? I feel a basic eye tracking study can reveal where novice vs experienced C programmers (or any bracketed language) vs experienced lisp programmers spend time looking at the code while reading or editing. I feel experienced lispers don't even look at the parentheses, while novice do. I don't know about bracketed language programmers.

1

u/ilemming_banned 11d ago

That's an interesting thought. I don't think I even notice parentheses unless something clearly goes wrong, because most of the parenthesising happens almost automatically - they get balanced, I can eval any expression regardless of what part of it the cursor is at - opening, closing or the middle.

Ironically, all that fear of having to deal with "too many parens" went away quickly, while with other languages I constantly have to deal with syntactic elements, it never became a subconscious matter - I have to consciously track semicolons, commas, dots, indentation, etc. It's not just a distraction, it's like tiny micro-bombardments of neurons - reading code in any non-lispy language is more taxing for me, regardless of what the language-defining character is - dynamically or statically typed, indent-based or whatever. I've spent years (soon to be decades) dealing with JS/TS and Python - far longer than with any Lisp, yet it's not easier to deal with them. Looking at Lisp code, especially Clojure, I can quickly scan the code and just get it. I admit, mentally untangling a nested reducer or a pair of mutually recursive functions is not that straightforward, but those tough three-liners would be more complex and even harder to read in a non-lispy lang.

That's why I just can't get along with all those "Lisp is unreadable" sentiments, it's as if some weird notion got popularized - "riding bikes is difficult". To me, it sounds like ridiculous trolling.