3 ms·
I've never seen anything but praise for clojure.
by golly_ned 2y ago
I've never seen anything but praise for clojure.
- iLemming 2y ago> I've never seen anything but praise for clojure. I've seen plenty of tomatoes here on the orange site, thrown at Clojure. Interestingly, years ago, when I was deciding if I should learn Clojure, I have typed into Google "why Clojure sucks". That's actually my usual "research technique" for any new tool - after the initial intro and the wikipedia pages, I typically do that and try to find some criticism, in order to remain level-headed. And guess what? To my surprise, instead, I found a plenty of compelling reasons to learn the damn thing, which I did. That has changed my life, not exaggeratingly, quite for real. So my conclusion and advice to young programmers? Use whatever tools make you happy. Don't worry about their popularity, don't listen to couch-surfing "experts", try them for yourself. Be skeptical, first and foremost about your own reservations, thoughts, and feelings - something you dislike initially may change your perspective later. Conversely, be looking out for even better ways - remember, it's always possible to find renewed joy for the craft, even after decades of trying different things. There's always something out there that would feel like it was made for you to enjoy it.
- roenxi 2y agoYou've never seen someone encounter Clojure stacktrace-barf when something breaks before. The language isn't perfect. Although it is one of the few I've encountered that does immutability properly and that is great. The stacktrace-barf has improved a bit in recent versions as I recall, although I've lost the ability to see them by now.
- sundarurfriend 2y agoI was gonna reply something similar too. The only "counters" people have when talking about Clojure (that I see, as a non-Clojurian) are pretty weak, and are usually: "it uses JVM, and JVM bad mmmkay" and the typical lazy dismissal of Lisps as "omg it's parantheses everywhere".
- worthless-trash 2y agoMy new favourite is am seeing is clojure doesnt have enough syntactic sugar. SMH.
- maleldil 2y agoAdd "dynamic language" in this day and age where everyone thinks static languages are cool again.
- ldite 2y agoThe dynamic typing and "everything is a map" can be a PITA. At the moment I'm working on a codebase that has I/O to JSON APIs, Avro schemas and postgres databases. That means that a field called "date" can be either a string, integer days since the epoch or a Java Date, and (because this codebase isn't great) there's no way of knowing without tracing the call stack. With the right discipline (specs, obsessively normalising all data at the boundaries, good naming conventions) this wouldn't have been a problem, but that discipline is optional, and headbanging aggravation results. (This is, of course, a generic "dynamic typing" problem, but that's a key feature of Clojure)
- mkreis 2y agoI'd emphasize that it's a problem with your particular code base. If you set it up correctly, all dates are properly parsed at the boundaries and you would only deal with one type of date inside your app. I'm working on a large Clojure app with a lot of date handling and never had any issues. For me, a date is always juxt/tick date.
- ivanb 2y agoThe parent comment illustrates the problem with one clear example. In real-world code functions pass around amorphous maps, they add, subtract and transform fields. There is no way to know what's being passed around without reading the source of the whole chain. Statically typed languages reduce the need to know how the data is structured or manipulated. The market has clearly chosen this benefit over what Clojure can provide.
- erichocean 2y ago> There is no way to know what's being passed around without reading the source of the whole chain. But that's not what a Clojure dev would do. 1) We use Malli [0] (or similar) to check specs and coerce types if needed at every point. Checks can be left on in production (I do), or disable–up to you. 2) If the coercion is difficult, use something like Meander. [1] 3) If even that isn't straightforward and you need actual logic in the loop, use Specter. [2] 4) If you're not sure what going on at intermediate steps, use FlowStorm [3]. 5) But you're going to be processing a lot of data you haven't seen before! Use, Malli with test.check [4] and make use of property-based testing with generators. None of this is "advanced" Clojure, this is bread-and-butter stuff I use every day. 6) Need a Notebook-like experience to get better visualization of intermediate data? Use Clerk [5]. 7) Need special checks on API usage within your codebase? Use clj-kondo [6] with custom linters. They're less than 10 lines each. Unlike default-mutable languages, or typed, it's safe and easy to use libraries with Clojure and they tend to have very little churn. Total opposite from Python or JavaScript (if you're used to that). It's almost impossible to give the impression of what it is like to develop with Clojure if you've only ever used languages with static typing, or languages from the Algol family. Honestly, I hated Clojure's syntax at first BECAUSE I COULDN'T READ IT, and I loathed "structural editing." After 2-3 weeks, I read it just fine and it's hard to remember I ever couldn't do so. Now I like it, and structural editing makes it so easy to change your code, I couldn't live without it at this point. Basically, all my "fears"/dislikes were unfounded—it was a skill issue on my part, not a problem with Clojure. [0] https://github.com/metosin/malli https://github.com/metosin/malli [1] https://github.com/noprompt/meander https://github.com/noprompt/meander [2] https://github.com/redplanetlabs/specter https://github.com/redplanetlabs/specter [3] https://www.flow-storm.org/ https://www.flow-storm.org/ [4] https://github.com/clojure/test.check https://github.com/clojure/test.check [5] https://clerk.vision/ https://clerk.vision/ [6] https://github.com/clj-kondo/clj-kondo https://github.com/clj-kondo/clj-kondo
- ddellacosta 2y agoAfter writing Clojure/CLJS for a decade professionally I think it's a toy language that is completely inappropriate for industrial use. But, at this point it's not worth my time to talk about it past that