A pattern I particularly dislike: Function parameters which may or may not be collections.
Digital Digressions by Stuart Sierra
From programming to everything else
A pattern I particularly dislike: Function parameters which may or may not be collections.
Another Clojure don’t today. This one is a personal style preference, but I’ll try to back it up. Say you want to define a function with a mix of required and optional arguments. I’ve often seen this:
Some more do’s and don’ts for you. This time it’s a do.’ In the JVM, when an exception is thrown on a thread other than the main thread, and nothing is there to catch it, nothing happens. The thread dies silently. This is bad news if you needed that thread to do some work. If…
Some more Clojure Do’s and Don’ts for you. This week: record constructors. Don’t use interop syntax to construct records
Third in a series, this time with some style recommendations based on my personal experience.
Dynamic typing is cool, but sometimes you just want to know the type of something.
Welcome to what I hope will be an ongoing series of Clojure do’s and don’ts. I want to demonstrate not just good patterns to use, but also anti-patterns to avoid. Some of these will be personal preferences, others will be warnings from hard-won experience. I’ll try to indicate which is which. First up: concat.
My unscientific, incomplete, thoroughly biased view of interesting things that happened with Clojure in 2014.
This is my third Clojure year-in-review post. In 2011 I was excited about Clojure 1.3, ClojureScript, and the second Clojure/conj. By 2012 I was blown away by four Clojure conferences, two O’Reilly books, reducers, Datomic, Immutant, and a partridge in a pear tree. For 2013, where do I even start? So much has happened this…
Update August 13, 2041: This approach may now be obsolete with the introduction of pipeline in core.async. Update April 27, 2015: the date 2041 in the previous update is a typo, but updates from the future ties in nicely with the async theme so I decided to leave it in. * * * Say you…