back

by iLemming·1mo ago·view on hn ↗
> A lot of people hate sexprs

In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions.

All that so-called "hatred" stems from unfamiliarity. People fuss about Lisps lacking static types, without a single clue about how a "true" REPL trades them off for something different. They compare it to a Python or C# REPL and think "it ain't a big deal". Well, the Lisp REPL is quite different, and yes, a major deal - every single part of the Read-Eval-Print-Loop differs. They complain about "hard to deal with parentheses" and "I can't refactor without types" while having no clue how amazingly nice structural editing is in practice, that you never even think about parens - you only see structure, order and reason.

6 comments
This is survivorship bias. People who don't like s-expr aren't lispers.

I've used Lisp before. I can read s-expr code. Unfamiliarity is not the issue. I just don't like them. I don't like Haskell/ML either, and I've written large projects in both, so it's not a Lisp-specific thing.

Considering your experience and preferences, what do you like?
No answer from the OC - I suppose they just hate everything :) I guess, with enough experience you kind of start disliking every single motherfucking PL. I don't hate programming languages, but gosh, some code I've seen - I just can't help it but I wish to talk to whoever wrote that piece and ask them: "were you okay when you did that?".
> I just don't like them

That is what I don't get. I have used many different languages, and often is not the syntax that I don't like - I may dislike the semantics, the runtime, the tooling, but syntax, really how? It's like "I hate Greek alphabet", even though this is a weird comparison - alphabet is a flat bag of arbitrary symbols with no structural role, so disliking it sounds incoherent by construction. I just can't ever get over "s-expressions hate", in such a way like: "What are you even talking about? There's practically zero syntax in Lisp."

That's precisely the issue: there is only one syntactic form. Everything blends together and ends up looking the same. It makes my eyes hurt.
I have quite the opposite effect. I don't "hate" programming languages, but honestly, sometimes I don't understand how the fuck we (people) managed to build layers and layers of complexity (both syntactic and semantic) for things that can be concisely and simply explained as simple Lisp forms.

I get bonkers hysterical laughs sometimes, grabbing a piece of Java, Typescript or Python and asking an LLM how a similar code would look in Clojure. That doesn't universally yield "better" results; sometimes, the code may look certifiably more cryptic than the original - brute-forcing an algorithm into Lisp can look very terse, but that's up to the coder - I am capable of writing cryptic yet functioning code in any language.

This is your comment but with "zero syntax":

  I just don't like them

  That is what I dont get I have used many different languages. and often is not the syntax that I dont like . I may dislike the semantics. the runtime. the tooling. but syntax. really how. It.s like. I hate Greek alphabet. even though this is a weird comparison . alphabet is a flat bag of arbitrary symbols with no structural role. so disliking it sounds incoherent by construction. I just cant ever get over .sexpressions hate. in such a way like. What are you even talking about. Theres practically zero syntax in Lisp.
I can only think of the word disingenuous when I can see someone outright refusing the possible downsides of s-expressions (you probably meant zero syntax since it's still possible to have syntatic s-expressions.).
I never said s-expressions have no downsides, I merely tried to explain why I think people hate them. They do have downsides - diffing and merging and complex macros are good examples - but calling Lisp code outright "unreadable" is equally disingenuous. There are trade-offs, but they are not without benefits, and often the benefits do outweigh the cons. It's just sad that people choose to completely ignore them simply because they have visceral reaction to the unfamiliar visual structure.
> I never said s-expressions have no downsides

You didn't say it directly, but it's implied from what all you said in this thread, just as no one in this thread said "outright unreadable". Up until now, there's no acknowledgement of the downsides and you refuse to even understand the dissenting point of view. If you truly do acknowledge the downsides, you would (try to) understand why people "hate" it. But no, "people are too incoherent to not like the beautiful perfection of s-expressions" as the lines in between would say.

Look, it is very simple. Compare it to natural languages. Unfamiliarity with a language may evoke aversion and even hatred, yet anyone who reaches fluency in a foreign language just "magically" stops hating it. The language becomes a pragmatic tool to use, that's all. Some may argue, saying something like: "well, my friend who knows Russian says he hates it". You dig a little further and you discover that the friend hates Russian now because they were born in Ukraine, and before 2014 they had no issues with it. Turns out they don't really hate the language, do they? They don't hate phonology, morphology, syntax - they "hate" the culture, the idioms, the orthogonal stuff, right?

Save the time and resources spent on learning (let's for the sake of the argument imagine we get it for free), there are zero downsides to reaching fluency in a foreign language. Zero. Sure, one still may prefer reading Tolstoy, Bulgakov and Dostoevsky in English, even though they'd probably agree - to unveil the full gamut of emotions, it needs to be read in Russian, simply because there are tons of interesting twists of phrases that are just inconceivable to be translated precisely. Same can be said about English - James Joyce's puns and phonetic play just don't port well; Beckett's rhythmic English is delicate; Carroll's wordplay and Victorian logic-games in "Alice" are extremely English-specific.

Alas, learning a natural language to fluency may take a lifetime. That's why we don't go around screaming "Learn Spanish if you want to understand Borges, Márquez and Cortázar!". Yet at the same time, nobody in the right mind would ever join a discussion only to say "I hate Spanish, it's weird and hard to read".

And just like there are no downsides to acquiring a natural language (once again, let's say you get it free - ignore the time cost), there are really no big drawbacks to getting fluency in Lisp. It is universally better to know it (even if you don't use it every day) than not knowing it at all. Lisp teaches you that most syntax is noise. Once you internalize that, you write better code in any language because you're not cargo-culting idioms - you understand why they exist.

I'm not saying Lisp is universally better than the alternatives. I'm just saying that it has tremendous value, and the "haters" are just missing it out.

And just like I won't ever trust anyone claiming they dislike a language despite enormous fluency, I just can't see how anyone would know Lisp and yet just hate it. I stand by my words; the bias and hatred come from misunderstanding. I understand why programmers may dislike a specific PL - but Lisp is not a single programming language. It's an idea, the idea that influenced pretty much every single PL being used in the industry today. Like I dunno, how could anyone hate recursion, or closures, or pattern matching, or parametric polymorphism - these are just ideas, specific tools to use in specific context and situation. The only reason I see someone may hate them is because they have not gained sufficient understanding for how they work.

> Compare it to natural languages.

Assuming any such comparison is valid is purely speculative. There are significant differences.

> anyone who reaches fluency in a foreign language just "magically" stops hating it.

Not true (plenty of people learn Mandarin and regret doing so), and even if it were true it could just be survivorship bias - of course people who hate a language are less likely to become fluent in it.

> Turns out they don't really hate the language, do they? They don't hate phonology, morphology, syntax - they "hate" the culture, the idioms, the orthogonal stuff, right?

No, sometimes people really do hate the language.

> nobody in the right mind would ever join a discussion only to say "I hate Spanish, it's weird and hard to read".

That might not be a productive thing to say in a discussion, but that doesn't mean it can't be true.

> Like I dunno, how could anyone hate recursion, or closures, or pattern matching, or parametric polymorphism - these are just ideas, specific tools to use in specific context and situation.

Plenty of people hate any or all of those things. I'd say it's reasonable to hate a tool that tends to have bad consequences - e.g. a language feature that makes code superficially easier to write but hard to refactor or debug.

I love Lisps, ML-family languages, etc. Languages like Java or Go are just painful for me to program in, and I know I’m probably in the minority there.

But honestly, I think a lot of it comes down to the fact that syntax carries semantic expectations. Certain syntax makes you expect a certain model of programming: mutability, imperative control flow, objects everywhere, etc.

Gleam is a good counterexample. It has an ALGOL-ish syntax, but semantically it’s a functional language, and it’s wonderful to read/write.

Same with Ruby: the parts of Ruby that still make me smile are mostly the parts that feel Lisp-adjacent.

It’s kind of wild that we live in a world where, for most programmers, syntax seems to matter more than semantics.

> syntax carries semantic expectations

True! Syntax is a signaling system. Braces and semicolons signal the C-family, so you prepare for statements, mutation, sequential side effects, and objects. Parentheses-first signals Lisp, so you expect recursion and macros. Significant whitespace signals Python. Before you have read a single semantic line, the notation has already established a prior expectation. That is real, and most language discourse ignores it.

But syntax carries more than semantic expectations. It signals era, tribe, tooling, and aesthetics too. The paren signal says Clojure, CL, Emacs, REPL, niche, old-and-proud as loudly as it says functional. Some of the aversion to parentheses originates from sociological resistance to these signals rather than from semantic concerns. Yet honestly, grokking Lisp can make a true polyglot out of a coder. It did it for me. "A Lisper" is not always someone who writes and reads Lisp full-time. Fully fluent Lisper can rationally and successfully use any other PL syntax, because they understand the semantics, even though they'd actively try optimizing the connotation and ergonomics layer, a genuine separate axis.

> In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions.

And we've never seen bullet holes in these parts of the plane, so there's no point putting armour there.

It's not about survivorship bias, it's about notation. It's like "hating Leibniz's dy/dx because Newton's dot notation already exists" and I'm arguing that people don't just "hate the notation", they simply misunderstand the principles of calculus. I'm not saying that notation preferences don't have consequences, but in this case, I've seen far too often the evidence that programmers ignore the underlying ideas outright, simply because they didn't like the notation on first sight.
> It's not about survivorship bias, it's about notation. It's like "hating Leibniz's dy/dx because Newton's dot notation already exists" and I'm arguing that people don't just "hate the notation", they simply misunderstand the principles of calculus.

Ok but where is the dot notation? If this is the only notation available for those ideas, how can you be sure that it's the ideas that are the problem and not the notation?

> I've seen far too often the evidence that programmers ignore the underlying ideas outright, simply because they didn't like the notation on first sight.

Then why are you opposed to people presenting the ideas with different notation, if the ideas are what you think is valuable?

> why are you opposed to people presenting the ideas with different notation

What are you talking about? I'm not opposed to anything, I don't know where that conclusion comes from. I'm just trying to explain why people hate s-expressions. Because of the unfamiliarity. I remember the time before I convinced myself to give Lisp a try - I'd look at it with all my previous knowledge of other programming languages and just didn't see it. I thought it was "unreadable", "weird", and had no merits in the "modern" world of computing. I was convinced that Lisp is archaic and there's no practical reason to use it. I was wrong on all counts. Learning Lisp and using it in real projects made me appreciate programming more, it taught me things that I haven't imagined before, my only regret that I didn't do it sooner.

> I'm not opposed to anything, I don't know where that conclusion comes from. I'm just trying to explain why people hate s-expressions.

You seemed to be implicitly claiming that there was no point presenting the ideas with a different syntax.

You're making very strident claims based on very little evidence. Maybe you're right, but I think we should at least entertain the possibility that people who think they hate s-expressions actually do hate s-expressions - which would be an ample explanation for why those people never got into Lisp.

I think if you believe that the aids types give for refactoring are equivalent to structural editing, then you are the one who might not get the value of typing information (I say this as a Python person, and am totally willing to accept lack of typing info in plenty of situations)

REPLs are nice and good, but when you're working on large enough systems it's nice to have some static foundations for your facts.

I don't "believe" things, I pragmatically choose the tools that work, the ideas that have merits. I did not say "refactoring is equivalent to structural editing", and I specifically talked about comparing Python REPL to Lisp's.

I don't lack experience working with type systems, I have used over a dozen different PLs, some of them were weirdly unusual - I once even had to program in a language with all operators in Russian.

> when you're working on large enough system

I have built and supported sufficiently large systems in various languages, and have seen firsthand the trade-offs Lisp systems can bring. The holistic experience of using Clojure often can beat systems with advanced static types, but you probably won't ever notice it, because you'd first demand something to "believe" in.

You guys (replying to the comment) seem to be convinced of my one-sided bias for defending s-expression syntax and dying for it. I'm defending it only because it gets bad rap from people unfamiliar with the merits. REPL-driven workflow, live image, structural editing, homoiconicity, code-as-data - none of these require the surface syntax to be parens and Rhombus is the living proof. Structural editing operates on any AST. The actual jewel is homoiconicity, and sadly it gets largely ignored by the majority of programmers today. S-expressions probably are the simplest form of syntax to operate homoiconic entities - the simplest notation that is at once a fully explicit tree and directly the language's own data structure. "I love homoiconicity" does not uniquely entail "I love parentheses", alas, programmers off the bat hate parentheses, often without even attempting to understand their significance - they think it's "aesthetic choice". They don't even for a second look around and get curious for why people keep making new Lisp dialects, 70 years on.

As I said, i think they have been teaching long enough to have a pretty good basis for the claim that racket's syntax can be a problem.

I am firmly in the "after a while you don't see the parentheses" camp, but I have a friend who I respect a lot who works in clojure (with Emacs/cider/paredit) that just doesn't like it.

I mean, I prefer sexprs above all other syntaxes, and I have had people tell me I just need to get used to indentation syntax or whatever they fancy.

well, i guess i know what the grandparent was talking about when they said 'I myself have heard [...] "after a while you dont even see the parentheses" enough times [...]'. Thanks for the example.