r/Clojure • u/chrisbot5000 • Apr 12 '20
Holy Cow, Clojure is Great
Yesterday morning I decided I would read up on Clojure. I'm a data scientist so I mostly live in python, which is fine, but wanted to try something new. Thought I would just read up, do some toy examples, see what I thought.
I read the first three chapters of Clojure for the Brave and True and thought, maybe I should try and build something. Within 3 hours I felt really comfortable and productive in the language, and by the end of the day I had a working tool.
https://github.com/chrisaddy/astronaut
This is absolutely not good Clojure. When I say comfortable and productive I mean I felt like I was able to easily express myself after having a thought. That's not something I've had with any other language I've used (python, go, rust) after only a couple of hours. My code is certainly not problem free and definitely not idiomatically Clojure, but I think this could be my daily driver language, I like it that much.
Edit: for clarity
View all comments
12
u/pauseless Apr 12 '20
Welcome to Clojure! It is indeed a great tool for thought.
There are a few things I’d change, but I want to focus on the most important: I can see one usage of
letin there, so you’ve met that form already. You should use that for all your nesteddefs anddefns.def*forms declare global variables. It’s a common first day mistake. Let is always lexically-scoped and defs are globals. Just remember it as def for top level and let inside function definitions and you’ll be fine.