by mapgrep · 5y ago · 0 comments
But the trade off is you short change yourself on learning core philosophical beliefs underpinning the design of the language. Understanding these poorly means you will not exploit the language very well and arguably should just stick with the prior language.
Clojure more than most languages is built around some unconventional philosophical beliefs. So for example “reduce” becomes more than just another sequence function; in clojure it is an important way to build up a result in the absence of mutable variables (which in another language you could use to build up a result within an arbitrary type of loop). You really don’t get that from reading this cheat sheet. But if you took some time to read a slower introduction this will be made clear (“reduce” is prominent in Clojure for the Brave and True for example).
Similarly recursion becomes much more important in clojure due this same constraint.
As a lisp, clojure offers the opportunity to use macros, which come with tremendous power but also some important gotchas. You won’t get much here on when to use and not use macros, just a quick walkthrough of defmacro and friends.
I could go on. Clojure’s powerful concurrency primitives, its a-la-carte approach to polymorphism and inheritance, its emphasis on plain maps — all these types of things warrant a deeper rethinking of how you solve programming problems which you’re not going to get by just diving in (rushing in really) to some coding.
I’m not trying to knock this guide, it’s fine, but it does show the limits of the very approach it celebrates. It’s fine if you’re jumping from say python to ruby or Java to C# but Clojure would be near the bottom of the list of languages to learn this way.
Guides like this give a quick-start into that world. The book-driven big-philosophy route might work better for some people, but to take your first example of "reduce" being special - well that's never really occurred to me as important or remarkable.
In time Clojure has transformed how I program computers, so the big ideas have settled in. I've never finished a Clojure book so I can't offer much reportage on their effectiveness.
We all learn differently, I guess that's the point.
I’d second the person who suggested watching some Rich Hickey talks on YouTube, or at least trying one and seeing if it agrees with you (that is, don’t force it if you’re miserable 10m in but I find him a compelling speaker and others seem to as well).
In descending order of preference I’d suggest (all are on YouTube):
- Effective Programs - 10 years of clojure (great overview of overall thinking behind clojure, touches a lot of key points, and a fun talk)
-Are We There Yet - this one resonated with me but not in most people’s top lists it would seem - a head on critique of OOP and dive into what makes functional and Clojure in particular better
-Simple Made Easy 2011 (there’s a 2012 where the audience is kind of a drag) - one of his most popular, his vision of what simplicity really means and how to achieve it in code
-the value of values - deep dive on clojures data philosophy
https://github.com/gengstrand/clojure-news-feed/blob/master/...
and in python
https://github.com/gengstrand/clojure-news-feed/blob/master/...
and in node.js javascript
https://github.com/gengstrand/clojure-news-feed/blob/master/...
That last one is pretty old and predates async and await.
- Arena Analytics: https://arena.io/
- Reify Health: https://www.reifyhealth.com/
- Guaranteed Rate: https://www.rate.com/
- OppLoans: https://www.opploans.com/
- LookingGlass Cyber Solutions: https://lookingglasscyber.com/
I also believe that DRW (https://drw.com/) also use Clojure but not 100% sure on that. I know they use some Elixir though.
Clojure requires a mental shift but it's not Haskell neither, you can be extremely productive after a few months.