Clojure as a First Language

by: Ethan McCue

This might come as somewhat of a shock to my regular audience, but I don't only write Java.

The reason I focus so much on specifically Java education is because it is often the first language people are taught. This matters for a lot of reasons, not all of which I have the page space to get in to, but crucially being taught first has a direct impact on a language's popularity.

I'm writing this because I think Clojure now has a real shot at becoming a first language.

Why

Of all the less-than-massively-popular-languages out there, Clojure is probably hurt the least by not having widespread adoption. This is in large part because it gets to piggyback on existing libraries and ecosystems.

Clojure is a hosted language. Clojure on the JVM can use any Java library, Clojure in the browser can use any JavaScript library, and so on. It is always good when Clojure-native libraries get written, but they've never been an absolute necessity.

So why pursue popularity?

1. Paper Clipping.

A lawyer has a duty to be a zealous advocate for their client. There's a non-trivial tribal monkey aspect to wanting your programming language to be popular and, at a certain point, pursuing that end has no fundamental justification.

But we make our own meaning in life so screw it.

2. It's Better.

The value proposition of Clojure is different to most other languages. I'm not going to s*** Paul Graham's d*** or wax poetic about macros, but it's hard to deny that Clojure codebases tend to be quite different to those written in Python, JavaScript, Java, R, etc.

There are reasons to think that Clojure could be a better fit for producing certain genres of software. Popularity would therefore lead to "better" software being produced, which is reasonable to want.

I'm being vague on purpose here. The difference between closed and open aggregates alone could be its own essay.

3. Money.

The more people who use Clojure the more Clojure jobs there are. The more Clojure jobs there are the more secure Clojure experts can be, etc.

TypedClojure is a one-man-show. TypeScript is funded by Microsoft paychecks. Popularity opens the door to all sorts of support.

How

So to become popular you need to be someone's first language. To be someone's first language you need to be what they learned in school. This means convincing teachers and curriculum makers.

For CS education I think this is a lost cause. There are very well-made CS 101 courses that use lisps and face cosmically stupid pushback for doing so. It is hard to imagine winning that fight.

But people going for Computer Science degrees aren't the only people who program. When my brother got his Masters in Marine Biology he was taught R. Analyzing data, making charts, etc. is needed for a wide variety of fields.

I think Clojure could steal significant market share here.

Noj is a collection of a bunch of data science libraries for Clojure. With what is in there you can:

This has the makings of an extremely compelling pitch.

The biggest missing piece, as I see it, is resources tailored to people learning Clojure as a first language.

Historically the vast majority of Clojure programmers have been transplants from other languages. We have books like Clojure for the Brave and True that serve this crowd, but few-to-none for people who are starting truly from scratch.

This has also affected the way people talk about Clojure. Keep in mind that you don't need to convince people of functional programming, homoiconicity, or anything else when it's the first thing they learn. The pitches you'd use to pull in a Ruby programmer should be kept in their lane.

So that's the gap. The data science people are presumably going to keep chugging away at the things they do. If you are interested in making Clojure a "First Language" give a shot at making something that fills that gap.


<- Index