Hacker News new | ask | show | jobs
by buzzwords 1581 days ago
I would love to work with clojure. I thought there were opportunities for to work on a clojure project in my previous company. But I was told that no one likes to work on these products hence why they moving away from clojure and rewriting everything in java or scala. I wish I could tell you exactly why they hated it, I never got an answer. Speaking to some of the individuals, they thought it came down to tooling, no career benefits and some people really missed types.
2 comments

The tooling is actually great, but kind of hard to discover if you're a beginner. The clojure.org website isn't very beginner-friendly, unfortunately.

Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about.

Clojure is much more exploratory in the way that you are always connected to a live system (like other Lisps) plus most of your functions are small and pure, making their logic self-contained and simple to deal with in isolation.

That mirrors some of my experience of Java vs a repl heavy Python habit, BUT — this misses the experience of diving into and reading unfamiliar or new codebases. For me, this is where the chunky type system and regularity of even the worst maintained Java codebases really shines.
> Types... I find most people missing static type checking are really reliant on a certain way of programming which isn't applicable to Clojure, e.g. write code, look for red squiggly lines, fix type signatures, compile, wait, fix the bugs the compiler tells you about.

I use a repl in Haskell just as much as I used a repl in Clojure.

The development experience is also somewhat similar if we're talking in terms of what you described here. In Clojure, you also fix the bugs the compiler tells you about, except the compiler in this case is one you partially implement yourself with a test suite.

> plus most of your functions are small and pure, making their logic self-contained and simple to deal with in isolation.

This is hardly exclusive to Clojure.

Maybe I wasn't describing you then.
It's the latter argument that did it for me. I never again want to work primarily with a technology that doesn't have encapsulation of optional types. It's just such an uninteresting problem to have to continuously suffer from.
You may have seen it already but Rich Hickey the creator of Clojure had a great talk about this https://youtu.be/YR5WdGrpoug
I’ve seen a few of his talks, but I do not accept his position on types more generally. I wrote a rebuttal to a similar talk he gave a few years ago.

https://jezenthomas.com/rich-hickey-doesnt-know-types/

Huh, good post, thanks. What are you usually working with, Haskell? Or I saw Elm mentioned on your blog. I've been considering learning Clojure as something new to help broaden my skills (currently using TypeScript in my day-to-day and some noob-level knowledge of Haskell). Your post has me reconsidering, haha >_>
Yes, I mostly work with Haskell. I'm the CTO at Supercede and our project is currently ~100,000 lines of Haskell code.

I think every developer ought to at least learn Elm. Being forced to think so lucidly about the types and effects of your systems is unreasonably effective, and I think it shapes the way you then write code in other languages.