News for hackers. Stuff that matters.
Re:State of Clojure 2020 by cageface on Friday February 21, 2020 @12:43AM (#22381173)
A few years ago I started a personal project of implementing a lot of common ML algorithms in both Scala and Clojure simultaneously. I expected Clojure to be a much better fit for this sort of thing but I was surprised to find that as my codebase grew in both languages the Scala code was much, much easier to understand and maintain. There were a lot of time consuming bugs in my Clojure code that were prevented by Scala’s strong typing. I was able to refactor with a lot more confidence in Scala.

So as much as I like some things in Clojure I’d pick a statically typed language for most jobs now.

Re:State of Clojure 2020 by mercer on Friday February 21, 2020 @12:09PM (#22384713)
I'm honestly curious how Clojure + spec would fare in that comparison. Is that something you looked into?

The reason I'm asking is that while my background the typical webdev stuff, I loved TypeScript. And now while much of my work is backend, it's similarly dynamically typed by default because I'm using Elixir. I've dabbled in Elixir's 'spec' and quite enjoyed some of the benefits Dialyzer/Dialixir offered me, but not enough to be able to tell how beneficial it is in my projects.

More than once I've run into issues that I wouldn't have had if I had used specs, but the fact that it's not a default in the community gives me pause. It makes me wonder how much advantages 'gradual typing' actually give me over just being a more thoughtful developer.

Re:State of Clojure 2020 by cageface on Friday February 21, 2020 @09:18PM (#22388950)
It’s an interesting question. I’m not sure if the spec stuff existed at that time. Like you say I think it makes a big difference if it’s built into the language. Typescript is a lot more useful now that it’s become so mainstream, for example.