Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Lisp syntax is nice to work with irrespective of everything else

Disagree. Some people find it tolerable for the sake of lisp advantages (mainly macros). Very few find it outright preferable. The existence and popularity of reader macros is proof of this.

> Because syntax matters, M-expressions and Algol syntax for Lisp fell by the wayside.

Because they were bad syntax. And because syntax isn't the only thing that matters. A good syntax that didn't compromise the ease of writing macros would win out, if such a thing were possible.



In the computing industry as such, few people find it preferable, because few people know and work with Lisp.

In Lisp circles, I would say that the majority of the people find Lisp syntax preferable. Opinions similar "I'm only tolerating this to get to the macros" are hardly ever heard. The opinion, "I wish this non-Lisp language I have to work with were written in S-expressions" is often heard.

Lisp syntax is uniform, consistent, easily formatted in different levels of line breaking, easily manipulated by text editors.

There is no ambiguity due to associativity of precedence. You never wonder which expressions belong to which operator.

I got hooked on Lisp before Lisp macros became a meme; I liked working with it before learning about macros.

Lisp-syntax front ends for non-Lisp languages prove that there are communities of people who prefer that syntax. E.g. Hy or Hissp for Python, Fennel for Lua and such.

Lisps have a considerable amount of notation in addition to the parentheses. Not everything in the written source code is denoted by an open parenthesis and symbol. That's a strawman view of Lisp syntax. However, the notations are token notations that play along with the rest of the syntax.

Not all languages in the Lisp family or Lisp-likes have reader macros. Scheme doesn't have them, except the descendant Racket dialect which has the #lang thing. The Lisp-like functional language Clojure doesn't have reader macros, yet is quite popular.

In TXR Lisp, I intentionally didn't provide reader macros.

Reader macros are not heavily used in Common Lisp. Not all uses of reader macros in Common Lisp programs and libraries are for the purpose of deviating from the concepts of Lisp syntax.

Reader macros have disadvantages:

- the Lisp printer doesn't know about the syntax and doesn't use it.

- external code tooling doesn't know about reader macros: everything from syntax coloring to identifier cross-referencing and whatnot. That makes reader macros disruptive.

- reader macros can clash. (In the Common Lisp FOSS landscape, there is now a "named readtables" module for disciplined use of multiple custom syntaxes).


From

    print (x);
to

    (print x)
From

    if (cond) {
         do_a();
    } else {
        do_b();
    }
to

    (if cond 
        do_a
        do_b)
Really it is more a mindset than anything else.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: