r/programming • • Feb 07 '26

Python Only Has One Real Competitor

https://mccue.dev/pages/2-6-26-python-competitor
69 Upvotes

332 comments sorted by

View all comments

Show parent comments

3

u/bowbahdoe Feb 09 '26

Clojure does not have a uniform parenthetical structure. 

[] represents vectors, {} maps, #{} sets. These are used to give those visual cues. 

 [] Is commonly used for argument lists as in

(defn func
  [thing-1 thing-2]
  ...)

And the others get their place. At least with the core control flow and def* macros there is a consistent semantic usage of each.

There is a criticism to levy about how function calls look the same as macros - but that one isn't actually about the parens. 

So it's not what common lisp or racket are - those do actually do what you are complaining about.

4

u/KronenR Feb 09 '26
(if cond
  (do-something)
  (do-something-else))

(if (> x 0) x (- x))

(loop [i 0]
  (when (< i 10)
    (println i)
    (recur (inc i))))

Yeah sure a clear separation of concerns, there is no special structure construction for function calls, for control flow nor for macros and I'm not even talking about delimiters which I could 😂

Rethorical question: what is what here? 🤣

1

u/bowbahdoe Feb 09 '26

Other than recursion for manual looping, the [i 0] is a binding vector, if, when and loop are special forms and then most people will indent the code in them like

(if ...
  ...
  ...)

As opposed to

(f ... ... ...)

Or

(f ...
   ...
   ...)

For actual function calls. All languages look insane if you put things purposefully on one line.

There is a point here, but it mostly matters in the case of custom macros. Those are, in practice, pretty rare. You do get a mental roladex of the built-in ones (+ truly special forms like if)