There comes a point in a programming career — at least one as peripatetic as mine — at which learning a new programming language barely registers as an obstacle. I’m not talking about mind-meltingly different languages like APL, just your run-of-the-mainstream object/imperative mishmash. Grab a syntax cheat-sheet, skim the standard library docs, and off you go.
Tag: Clojure
Clojure Start Syscalls
Inspired by a recent article comparing the number of system calls at start made by various compilers, I decided to do the same with my Clojure start-time experiments.
Clojure Start Time in 2019
From 2011 to 2015, I wrote an annual Clojure Year in Review post, attempting to summarize all the interesting things that happened in Clojure in the last year. After 2015, I gave up. There was just too much happening, and I couldn’t keep track of it all. A couple of years ago, I got tired… Continue reading Clojure Start Time in 2019
Sequences in Flatland
The inimitable Chouser has written an exhaustive analysis of the many ways to flatten a sequence of sequences in Clojure.
Clojure Don’ts: Numbered Parameters
Continuing my series of Clojure do’s and don’ts — which, as always, is a mix of technical recommendations and my personal stylistic preferences — and continuing on the topic of the previous post in this series, here are some more arbitrary rules about anonymous functions.
Clojure Don’ts: Short Fn Syntax
A mistake that shows up at least once in almost every class I teach. The Clojure reader macro #() creates an anonymous function whose body is a single expression, and that expression must be a list.
Clojure Don’ts: Thread as
A brief addendum to my last post about Clojure’s threading macros. As I was saying … I said you could use as-> to work around the placement of an argument that doesn’t quite fit into a larger pattern of ->. My example was: (-> results :matches (as-> matches (filter winning-match? matches)) (nth 3) :scores (get… Continue reading Clojure Don’ts: Thread as
Threading with Style
No, not multi-threading. I’m talking about Clojure’s threading macros, better known as “the arrows.” The -> (“thread-first”) and ->> (“thread-last”) macros are small but significant innovations in Clojure’s Lisp-like syntax. They support a functional style of programming with return values and make composition intuitive. They answer the two chief complaints about Lisp syntax: too many… Continue reading Threading with Style
How ’bout that start-up time?
How long does Clojure start-up really take? Let’s find out.
Clojure Don’ts: Non-Polymorphism
Polymorphism is a powerful feature. The purpose of polymorphism is to provide a single, consistent interface to a caller. There may be multiple ways to carry out that behavior, but the caller doesn’t need to know that. When you call a polymorphic function, you remain blissfully ignorant of (and therefore decoupled from) which method will… Continue reading Clojure Don’ts: Non-Polymorphism