Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just to drive the point home, Clojure's core.clj is 6,500+ lines of Lisp, funny enough, parens do not dominate - http://twitpic.com/6hwt28/full.


Well, there is a very good reason for this: Clojure tries to reduce the number of parentheses by substituting other characters, namely square brackets []. For example:

    ; Common Lisp
    (defun add (x y) (+ x y))
    ; Scheme
    (define (add x y) (+ x y))
    ; Clojure
    (defn add [x y] (+ x y))
Also, Clojure eliminates some parentheses that are used in other Lisps:

    ; Common Lisp and Scheme
    (cond ((> x 0) 1)
          ((= x 0) 0)
          (t -1))
    ; Clojure
    (cond (> x 0) 1
          (= x 0) 0
          :else -1)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: