top | item 39377672

(no title)

lilactown | 2 years ago

I think it's as much about familiarity than anything else. I've programmed full time in Clojure for the last 6 years, and I find it just as easy to read than other languages I'm familiar with (JavaScript, Java) and way less easy to read than other languages like Haskell or OCaml that have their own syntax lineage. I'm sure if I spent an amount of time becoming familiar with them, I'd find them just as easy as I do Lisp.

There are certain things that languages can do that make syntax easier; for instance, Clojure's default constructs reduce a lot of parens compared to CL by using brackets [] and removing nesting. For instance

    ;; clojure
    (defn sum-and-square [a b]
      (let [sum (+ a b)]
        (* sum sum)))

    ;; common lisp
    (defun sum-and-squaer (a b)
      (let ((sum (+ a b))
        (* sum sum)))
This leads some people to assert (with other reasons too) that Clojure is not in fact a "lisp."

discuss

order

lispm|2 years ago

    ;; common lisp
    (defun sum-and-square (a b &aux (sum (+ a b))
      (* sum sum))

erichocean|2 years ago

    ;; clojure
    (defn sum-and-square [a b] (let [sum (+ a b)] (* sum sum)))
Honestly, I'm not sure what you're trying to show.