Good article from @xah_lee@twitter.com about why #clojure sucks

xahlee.info/comp/clojure_is_ha

But @unclebobmartin@twitter.com recommended it so I'm going to give it a try

@yisraeldov my team regularly hires coop students, and pretty much all of them get productive within a couple of weeks of using Clojure. So, I'm not really buying this Clojure is hard to learn business to be honest.

@yogthos I don't think I ever said it was hard to learn. And I don't think that was any of @xahlee 's points either.

Oh and what are coop students ?

@yisraeldov @xahlee "clojure is hard to learn" is literally the opening line of the article, and then it just lists a bunch of things that are different in Clojure from other languages.

In Canada, universities have coop programs where students can get 4-8 month work placements while doing their degree. My team's been hiring students to work on our projects for 4 month terms. And we teach them FP and Clojure when we hire them.

@yogthos @xahlee LOL, I don't know how I missed that. Ok, so *my* claim isn't that it is hard, but more that it feels bloated and encourages hard-to-read code.

@yisraeldov @xahlee You can write hard-to-read code in literally every language out there. It's not the job of the language, but rather that of the developer to write clear and readable code. This problem is addressed by using good design practices, code reviews, testing, and documentation.

If anything, I'd argue that Clojure is much easier to read than most languages because the community has settled on a few common patterns that everybody uses.

@yisraeldov @xahlee I worked with Java for over a decade before I started working with Clojure. In that time I haven't been able to contribute to a single open source project.

Meanwhile, I've contributed to numerous Clojure libraries because I'm typically able to open up a project I've never seen before and easily figure out what's going on there.

@yogthos @yisraeldov worked in java over a decade before clojure? lol 🀩 that's why you like clojure and find it easy.

@xahlee @yisraeldov it's not like I haven't used other languages than Java in that time, and I tried getting into CL and Scheme multiple times, they just never clicked for me.

@yogthos @yisraeldov
for me, clojure's mix with java is a problem.
i'd rather do scheme, or even python ruby golang, than deal with the jvm and java.
i wish clojure would separate itself from java. like, even string functions and regex, clojure tell people to use java class methods.

@xahlee @yisraeldov different strokes for different folks and all that. I've used many languages over my career including Smalltalk, Haskell, F#, Java, Js, and Scala. I'd take Clojure over all of them any day.

Follow

@xahlee @yisraeldov I also don't understand why the jvm is such a problem for a lot of people. It's performant, has great packaging story with jars, has a huge ecosystem, and tons of mature libraries. And frankly, it's just not that hard to use.

@yogthos @yisraeldov for me, my machine is typically 4 years old. starting any jvm, such as starting a server written in clojure, all fans starts to whirl loudly, and max out 8G ram.

@xahlee @yisraeldov my work machine is from 2013 and it has no problems with the JVM. For Clojure specifically, you rarely need to restart the app once it's running. I typically have the app running for days on end while I develop it.

I also find it rather amusing that you complain about Clojure syntax being hard and in the next breath advocate for es2015.

@yogthos @xahlee "I also find it rather amusing that you complain about Clojure syntax being hard and in the next breath advocate for es2015." Yeah this I agree with. Javascript is just a mess, some languages promote bad code, In JS It is almost impossible to write clean code.

@yisraeldov @yogthos
i also much prefer clojure syntax than js.
but, if you want to do web dev, js is the name of the game. that's the thing. the reality.
of course, if you are so invested in clojure in server and everything, then clojurescript would be a better choice. Else, js + typescript, or, goto reasonML, elm, elixir, purescript, as these latter are still dedicated on webdev.

@xahlee @yisraeldov my team has been building apps with ClojureScript for years now, and we don't use NPM or any of the Js ecosystem. Everything works great. These are large apps with over 100kloc on the front-end. I co-presented about one of our apps recently if you're interested:

m.youtube.com/watch?v=IekPZpfb

@hj
lol. that's not practical, when you go beyond 1k lines of code.
@yisraeldov @yogthos

@hj
lol. that's even worse.
NEVER, write unit test.
that's from people who dunno how to code, made worse by corp greed wanting to make create easy replacement coder cogwheels.
Use diff lang, yes, like reasonML, elixir, purescript.
and, study proof theory if you want to replace unit test.
@yisraeldov @yogthos

@Feuerfuchs @hj @xahlee @yisraeldov I don't think there's anything wrong with TS, but it's a far cry from cljs in my opinion because it's still a layer on top of js and inherits a lot of the problems inherent in the language and the ecosystem.

@yogthos @xahlee On my machine it takes about 60 seconds to build and "hello world" clojurescript. That is a long time!

@yisraeldov @xahlee yeah cljs takes a while to compile unfortunately, especially with optimizations. Are you using shadow-cljs or figwheel to do hot loading during dev time?

As a side note, for server side stuff I find clj works better than cljs overall. It compiles faster, the REPL integration for editors is superior, and you don't have to deal with async for most things.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!