HeadlinesBriefing favicon HeadlinesBriefing.com

Why Lisp Notation Feels Harder to Read

Hacker News •
×

The Lisp family of programming languages is infamous for parenthesis-heavy syntax. Many find this style more difficult to read than Python, Java, or C. Despite attempts to create new notations, there is no fully satisfying explanation for why Lisp feels less readable.

Developers often argue it is merely a familiarity issue; once programmers get used to Lisp, they allegedly stop noticing the parentheses. However, a deeper investigation into cognitive science suggests there is more to it. Human perception has built-in hardware acceleration.

The Stroop effect, where conflicting colour and word information slows reading speed, demonstrates how our brains prioritize certain inputs. Similarly, visual search tasks benefit from 'hardware acceleration' tricks like shaped icons and highlight colours to find outliers quickly. Just as these design tricks leverage perceptual strengths, programming languages should be designed to work with human cognitive hardware.

While syntactic differences like infix notation and curly braces receive attention, the core issue may lie in how parentheses group operations differently than infix operators. Lisp's `(operation arguments...)` structure requires parsing a different mental model than the infix styles developers are accustomed to. Deeper insight into these perceptual mechanics could lead to more readable syntax designs.