6 ms·
A lot of people hate sexprs. Even seemingly reasonable folks. I imagined they have met students that really struggle with the syntax, while grokking the concep
by bjoli 4mo ago
A lot of people hate sexprs. Even seemingly reasonable folks.
I imagined they have met students that really struggle with the syntax, while grokking the concepts easily.
I myself have heard "the parentheses are hard to balance" and "after a while you dont even see the parentheses" enough times that I think maybe both can be correct.
- drob518 4mo agoMy editor balances my parentheses (Emacs Paredit). I rarely think about them. I just think structurally and the editor manages the details.
- psychoslave 4mo agoIt really feels like, "when I move through the wasteland, I only focus on the path and GPS is guiding me well". For some reasons, people tend to prefer having a walk in a forest rather than in z wasteland.
- drob518 4mo agoLook, if you’re committed to Blub, don’t let me talk you out of it.
- iLemming 4mo ago> when I move through the wasteland You got that exactly backwards. A non-lisper unavoidably has to deal with tons of syntactic and semantic clues - parens, colons & semicolons, square brackets, indentation & white-space, special chars, static type annotations, lsp servers and tree-sitter parsers. Lisp only needs two things - a [small] set of structural idioms, and a live REPL.
- iLemming 4mo ago> 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.
- jitl 4mo agowell, 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.
- bjoli 4mo agoAs 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.
- lmm 4mo ago> 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.
- iLemming 4mo agoIt'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.
- lmm 4mo ago> 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?
- IshKebab 4mo agoIt's not unreasonable to dislike coding in s-expression syntax. It is not very readable. There's a reason the vast majority of programming languages (especially weighted by popularity) use more traditional syntax.
- iLemming 4mo ago> It is not very readable. That holds true only for two cases: - For a programmer who never learned Lisp as their first language. I have met people who learned Clojure as their very first PL and they said it was fun. Later there were utterly confused about Java, Python and Javascript. Going the opposite may feel confusing and identity-breaking. - Reading static code. In a sense, it can be a bit harder to read a wall of Lisp, say printed on paper. Lispers typically don't inspect "dead code" like that; they'd connect to the live REPL and eval expressions on the go, programming it from "inside out". With experience, it becomes easier to scan the code and mentally parse it. Lisp at that point actually gets far more readable than any other PL. For instance, Lisp code is better suited for smaller screens of smartphones - the code wraps around yet retains its readability. Try that trick with literally any other language, I can 100% guarantee - most of them would look like a huge pile of indecipherable mess.
- IshKebab 4mo ago> For a programmer who never learned Lisp as their first language Maybe. But I have never heard anyone say that Python is hard to read, and it's one of the most common complaints against Lisps. Just looking at them both it's hard to imagine how one could seriously believe that s-expressions are more readable. `(== a b)` is clearly worse than `a == b`. Even JavaScript programmers know that. > they'd connect to the live REPL Yeah I dunno this is the same cop-out Ruby programmers use to justify its lack of static typing. It's fundamentally better if you can understand code without having to run it.
- bjoli 4mo agoyou could also compare if (a === b && b === c && c === d && d == e) To scheme's (= a b c d e) JavaScript clearly has the upper hand.