This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Clojure and the fly likes The Clojure Way Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Languages » Clojure
Bookmark "The Clojure Way" Watch "The Clojure Way" New topic
Author

The Clojure Way

Dan King
Ranch Hand

Joined: Mar 18, 2009
Posts: 84
I've been learning/using Clojure for a few months now. While I'm comfortable with it, I still find myself trying to address problems as I would using Java, Ruby or Groovy only to later ask, what's the "Clojure way?" I'd appreciate suggestions on books and/or presentation that can help me with adjusting to the paradigm shift. Thanks.
Palak Mathur
Ranch Hand

Joined: Jan 29, 2007
Posts: 313

Dan King wrote:I've been learning/using Clojure for a few months now. While I'm comfortable with it, I still find myself trying to address problems as I would using Java, Ruby or Groovy only to later ask, what's the "Clojure way?" I'd appreciate suggestions on books and/or presentation that can help me with adjusting to the paradigm shift. Thanks.


Check the fourth post from the top (by Chas Emerick). He has tried to answer a similar question:-

http://www.coderanch.com/t/586539/clojure/Clojure-Programming-Questions


Palak Mathur | My Blog | TechJaunt | What is JavaRanch? | List of All FAQs
Chas Emerick
author
Greenhorn

Joined: Jun 27, 2012
Posts: 27

Dan King wrote:I've been learning/using Clojure for a few months now. While I'm comfortable with it, I still find myself trying to address problems as I would using Java, Ruby or Groovy only to later ask, what's the "Clojure way?" I'd appreciate suggestions on books and/or presentation that can help me with adjusting to the paradigm shift. Thanks.


Well, we do what we can in the book, but I wouldn't be too concerned about your falling back to prior habits just a month or two into learning/using Clojure. These things take time; I'm guessing that it took many months for you to really understand the "Java way" or the "Ruby way". Just keep reading, programming, and looking at well-written Clojure projects for hints at good form.

A great resource for this is the community around 4clojure, which often shares solutions to the problems there. Just remember that shorter isn't necessarily better; sometimes, it's fun to golf your way to a shorter solution, but too much concision can be too clever for its own good. :-)

--
(coauthor of Clojure Programming from O'Reilly; creator of Clojure Atlas)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: The Clojure Way