How should Clojure applications be structured?

Random thought from #clojure irc last night:

Clojure disposes of so much of the ceremony that exists in most programming languages and is so “data-oriented” that the structure of Clojure applications seems to represent the contours one’s domain far more than any other language I’ve encountered.

That is to say, outside of some probably very broad idioms, there’s probably no such thing as a “typical structure” of Clojure programs.

About these ads
This entry was posted in Asides, Clojure. Bookmark the permalink.

2 Responses to How should Clojure applications be structured?

  1. Pingback: How should Clojure applications be structured?

  2. Scott says:

    After having written a medium sized application with I think a very good structure split across a dozen or so namespaces of ~500 lines each I can tell you that the next clojure app I write will have far fewer namespaces. In fact it will probably be like the source of hacker news and be in one long file as much as possible. Circular dependencies are a very common problem in some domains (yes I know how to work around them with declare and loading tricks but it’s just annoying) and the compiler errors when there’s a problem in another namespace and you just get a reference to line 0 of the ns where it’s used is pretty annoying too.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s