263
submitted 1 month ago* (last edited 1 month ago) by pkill@programming.dev to c/programmer_humor@programming.dev

...from people who seem to refuse to install paredit or coloring plugins for either? ps lisp syntax ftw, it's a feature!

you are viewing a single comment's thread
view the rest of the comments
[-] DumbAceDragon@sh.itjust.works 27 points 1 month ago* (last edited 1 month ago)

I don't get why people hate semantic whitespace. The whitespace would be there anyway, and if anything it's easier to read as long as you avoid 15 nested if statements, and you're not using a dynamically typed abomination like python.

S-expressions are a hack because the Lisp devs didn't know how to make an actual compiler, and instead had the users write the syntax tree for them. (For legal reasons I am being facetious).

In all honesty, I can understand the reason people love s-expressions, but to me they're just unreadable at a glance.

[-] Traister101@lemmy.today 23 points 1 month ago

Semantic whitespace is awful because whitespace (something that you can't actually see) has meaning in how the program runs. Braces { } for scopes gives you the ability to easily tell at a glance where a scope ends. Whitespace doesn't allow for that. Especially, especially when you can accidentally exit a scope (two new lines in a row with Python) and it's not actually an error (Pythons global scope). Yeah formatters and linters make this less of an issue but it sucks... Languages with legible symbols for scoping are significantly easier to reason about, see end symbols in Lua.

[-] yogsototh@programming.dev 12 points 1 month ago

S-expressions are a hack because the Lisp devs didn’t know how to make an actual compiler, and instead had the users write the syntax tree for them. (For legal reasons I am being facetious).

Just for anyone thinking you are serious; https://en.wikipedia.org/wiki/M-expression I love how S-expression existed.

McCarthy had planned to develop an automatic Lisp compiler (LISP 2) using M-expressions as the language syntax and S-expressions to describe the compiler's internal processes. Stephen B. Russell read the paper and suggested to him that S-expressions were a more convenient syntax. Although McCarthy disapproved of the idea, Russell and colleague Daniel J. Edwards hand-coded an interpreter program that could execute S-expressions.[2] This program was adopted by McCarthy's research group, establishing S-expressions as the dominant form of Lisp.

[-] Corbin@programming.dev 1 points 1 month ago

And for anybody thinking of implementing M-expressions, look at Wolfram Mathematica, which is the only popular M-expression-oriented language. It turns out that high-level graph-rewriting semantics are difficult to make efficient! (If you want to try, you might also want to look at GHC or other efficient graph-rewriters to see what the state of the art is like outside Planet Wolfram.)

[-] isVeryLoud@lemmy.ca 6 points 1 month ago

I literally can't see whitespace, it gives me headaches looking for it. With brackets, I can get bracket matching in my IDE.

this post was submitted on 23 May 2024
263 points (91.5% liked)

Programmer Humor

18292 readers
552 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS