4 ms·
I think claims of improved productivity when switching to Clojure have a lot to do with the person making those claims and where they are coming from. I see Cl
by adamkl 5y ago
I think claims of improved productivity when switching to Clojure have a lot to do with the person making those claims and where they are coming from.
I see Clojure as almost sub-set of JavaScript bundled with a great standard library akin to Lodash or Ramda. You can write very Clojure-y functional code with JavaScript, and if that is what you are already used to doing, than you might not see a big difference in switching to Clojure.
But JavaScript is a bit of a kitchen sink. You want classes, you got em. You want prototypes, you got em. Functional programming, sure. This wide mix of language features means that everyone’s experience with the language will be different, and if somebody is coming from a very object-oriented background, being exposed to the data-oriented functional approach of Clojure can be an eye-opener.
Personally, using Clojure had a huge impact on how I approach development (having from from a traditional C#/Java background). I consider myself much more productive now and view problems in a completely different light. I don’t write Clojure for work, I’m pretty much full-time Node.js these days, but I credit Clojure with changing my development practices for the better.
I guess what I’m saying is that it’s not necessarily Clojure-the-language that make people feel more productive, but maybe it’s just the development style that Clojure almost forces upon people that makes them feel more productive.
(And personally, I just love the elegance of a language with such minimal syntax... and an abundance of parens)
- globular-toast 5y agoI agree with this. Many JS programmers have come into it either as their first language, or from object-oriented languages like Java. Unlike Python, there is no One True way to do things in JS. If you look at JS in the wild you'll see the same thing done in a myriad of different ways. I often think JS programmers prefer the one that makes them look the most clever. Learning a language like Clojure teaches you the importance of mutability, functional style etc. Once you know those things deeply, it's not about aesthetics or looking clever any more, it's about writing good code. But there is also the practical aspect. Plain JS lacks a lot of standard library support to be functional. You have to be really careful about what is functional and what isn't. The standard library is also inconsistent, like PHP (for example, how Map and Set .add returns the object but .delete returns a Boolean).