3 ms·
The thing is, it’s technically present, but culture is another matter. I maintain a Clojure project that ran using a number of interesting and convenient macros
by moomin 4y ago
The thing is, it’s technically present, but culture is another matter. I maintain a Clojure project that ran using a number of interesting and convenient macros. In practice, it made things harder for people to read and was unidiomatic. If you want anyone else to use or modify your code, you’d better stick with Hickey’s vision.
- capableweb 4y agoI don't know, the community in general tend to use macros that are well written. I keep seeing core.async being used (`go`) in Clojure projects, and also various macros for writing HTTP servers (compojure being a popular one which main code interface is a macro `defroutes`). ClojureScript projects also routinely add support for making asynchronous code look synchronous (like `async/await` in vanilla JavaScript) via macros. shadow-cljs's `js-await` being one of the well-written ones: https://github.com/thheller/shadow-cljs/blob/49fb078b834e64f63122e3a8ad3ddcd1f4485969/src/main/shadow/cljs/modern.cljc#L310-L326 https://github.com/thheller/shadow-cljs/blob/49fb078b834e64f... Usage: (defn my-async-fn [foo] (js-await [the-result (promise-producing-call foo)] (doing-something-with-the-result the-result) (catch failure (prn [:oh-oh failure]))) I'd say if adding a macro makes things harder to understand, you probably need to re-evaluate if you really should have a macro here, or the interface of the macro.
- moomin 4y agoYeah, there’s a couple of widely understood idioms like global static configuration and adding async/await. But the macros I’m talking about were very simple, well-defined things that exist in other languages. They were just unfamiliar. In any event, they’re ripped out now. But ultimately macros offer a lot more in theory than in practice.
- stingraycharles 4y agoAbsolutely, and this is being completely ignored in the whole discussion. We’re utterly dependent upon Clojure “core” for anything to become idiomatic; saying that it’s possible to make anything outside of core and do your own thing is about as productive as saying “just fork it” about opensource projects. I think that this post by Rich Hickey actually made me completely lose faith in Clojure’s stewardship after about 5 years. It basically signalled very strongly “we’re not interested in listening to the community”, which is fine, but that doesn’t align very well with how long-lived, successful opensource projects are managed. And I say all this as someone who was very actively involved in some of Clojure’s largest opensource projects.
- tsuujin 4y agoI just picked up clojure as a hobby project outside of work and I’m enjoying the language in general so far. I have to say that reading this rant gives me a bit of doubt about continuing. I actually agree with most of what this guy is saying, but the delivery is not good.
- stingraycharles 4y agoClojure, the language, and Rich Hickey, the vision, have had a tremendous impact on my programming career. Transformations of data as the primary building block for writing code was such an enlightenment. I absolutely encourage you to continue your endeavor of learning Clojure, as it’s almost guaranteed to be a net positive. It’s just the stewardship of the language that is my biggest problem. It’s very anti-community (as evidenced by this rant), and in general there is a tendency of “elitist” mentality the more you get into the core community. If you’re able to ignore all that, and just do your own thing, you’ll be fine.
- tsuujin 4y agoWell, I managed it with the Emacs community, so I guess I can do the same here lol.
- moomin 4y agoIt’s an interesting road, and I like Clojure plenty, but ultimately it’s a cul-de-sac. And the reason it’s a cul-de-sac is pretty heavily laid out by the original post.