woodings
woodings

Reputation: 7693

Why Clojure doesn't follow the most common indentation style in java code?

I was looking at java code in Clojure. I found the indentation to be very strange to me.

I'm pretty used to the indentation style by http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html#262. And most of the IDEs have configured auto-format in this way. Why doesn't Clojure follow this style?

UPDATE:

I meant the part of Clojure implemented in java e.g. https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ARef.java

Upvotes: 3

Views: 495

Answers (2)

number23_cn
number23_cn

Reputation: 4629

Why follow Java indentation style? Clojure follows Lisp.

Upvotes: 0

Ray Toal
Ray Toal

Reputation: 88478

The code you are referring to uses the Whitesmiths style of brace indentation.

It is a matter of personal preference. Nothing wrong with it, other than it is not very common.

Upvotes: 14

Related Questions