I’m happy I get to use ClojureScript at work these days. I have many reasons for being happy about it. I want to talk about one of them: it cares about my work. Yes, I know, this statement is as vague as it gets. Let me explain.
Previously I was using Objective-C and Swift to build iOS applications. I don’t necessarily like any of these languages. I like my work a lot, and I think the best tools are the ones that don’t attract my attention to them but get out of my way and let me focus on my work instead. My work is apps, not languages. I know both languages reasonably well to be effective — that is, to build these apps. I don’t care about using Swift on servers or Linux — I don’t think it’s that valuable in terms of utility, as there are very similar languages that can do the same. I try to approach programming languages from a very utilitarian point. I begin by learning just enough of them to continue the learning process through trial and error while delivering results. I don’t care if it’s statically typed, garbage collected, functional or declarative. The only thing that matters is that it either helps me or distracts me from shipping.
Also, I appreciate language enthusiasts. Language designers are often very creative people, so I enjoy listening to or reading their thoughts for several hours every month.
When Apple released Swift, the promise was ambitious and grand. Modern language, somehow better to work with, cool stuff like passing functions around and such. It all still probably holds. However, why I didn’t care about Swift, and still don’t care, is that Apple didn’t care about solving my problems with it. It’s a break of a relationship, if you please. I immediately felt like I’m being left out, yet I thought I was part of the community that made iOS so significant by bringing great apps to the AppStore. I checked yesterday, and the last version of Wunderlist still has 5.5k ratings with 4.6 stars average in Germany, despite not being updated for almost three years — it’s a great app and people like it. But again, Apple didn’t care about solving my problems. Yes, I know, Apple owes me nothing. It at least has to stay attractive to me. See, the problems I had are not solved with static typing or better syntax. I was making apps, and I needed better tools to make better apps in more efficient ways. I wanted hot reload, I needed faster build times, I looked for better UI testability, I would be happy not to solve codesigning issues in the 100th time. Yet I got something else.
So I had my reasons to be skeptical of the whole Swift’s hype-train, and I also was skeptical of me being skeptical. I like to think that I’m old enough to have had an opportunity seeing how my unshakable work- and programming-related convictions were detrimental to my professional and personal growth, so these days I deliberately decide to stay open to new ideas. Because most likely I don’t understand something. So I jumped on the train and started using Swift. And you know what? Exactly — nothing really changed. I like the new syntax a lot, I think composing functions is great, there’s
reduce from the standard library, and I like that it is still very practical. However, my working day hasn’t changed much.
Then this whole ClojureScript thing happened to me. Again, I was very skeptical at first, and skeptical of me being skeptical. I tried it, read about it, gave it a try. Then I discovered it pretty much gave me everything I hoped for. I can experiment with the UI in a live fashion. I can interact with a running app right from my editor (and no, hot reload is not the same as having a REPL.) But I also have a glorious hot reload. I write significantly less code. I need less testing because it takes me much less time to fix a mistake. These things were exactly the ones I wanted for developing apps.
So now I’m very happy that I’m in a land when things make more sense to me. I appreciate it when things make sense. ClojureScript hasn’t violated my trust yet. Does it have its flaws? It does. I still think it’s great because it cares about solving my most important problems.