Skip to content

Comment on I made a multiplayer shooter game in Lisp, here is my journey

Comments

How many closing parenthesis do you have on a last line?

Things that terrify ICE car drivers about electric vehicles: Range.

Things actual EV drivers rarely worry about: Range.

Things that terrify non-Lisp programmers about Lisp: Parentheses.

Things actual Lisp programmers rarely worry about: Parentheses.

Bit of a selection bias there, people with range as a concern don’t become EV drivers, same goes for people terrified of parentheses.

I don't think that's a great example, as I never heard of "range anxiety" until EVs started to become popular, and it was applied to and admitted by exclusively owners of EVs and also E-bikes.

But it's 2025, it was enough to downvote and ignore the GP comment... Even responding with a dismissive https://www.thejach.com/imgs/lisp_parens.png is too much in current year. Another comment mentions paredit/parinfer, I'm not exactly masochistic but I hate tools that automatically type more than indentation for me so I don't use them, but I also basically never think about counting parens.

I earn my paycheck in Clojure and have for about 10 years. In my experience if your code ends with ))))))))))) you're doing it wrong. This is a code smell for me.

Instead of (qux (baz (bar (foo x)))) use other tools:

- Big picture: is this code overly procedural? If so, is it possible to make it declarative and functional?

- Line-level picture: one of the thread macros, functional composition, etc. will make this more readable. For example: (-> x foo bar baz qux).

As many as needed for the level of nesting?

...you do know no s-expression editor makes you count or type those out manually, right? It's all handled by paredit or parinfer, unless you're a masochist.

It's just not something any lisper thinks about.

In college Intro to CS was taught with Racket (a lisp) and we even had to write code with pen and paper during our exams. Got really good at quickly visually matching parentheses which is still helpful to me today in non-lisps. (But given that the handwritten code would never be run, you could also just fudge it and write a bunch of )))))'s at the end and hope the TA grading it wouldn't count them either)

Average Northeastern student.

The indentation of the lines is what matters not the number of parentheses on the last lines.

If you want to have closing parentheses on separate lines the code simply becomes to long.

I didn't understand this when I started writing Lisp, but that style has its advantages and is supported by the editors.

Exactly as many as opening! (I mean what else did you expect?) :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.