3 Comments
User's avatar
Sean Corfield's avatar

I think this is part of why I don't like Specter: yes, it can produce incredibly concise, powerful solutions to data navigation and transformation, but the "cost" is a very non-idiomatic DSL (in my opinion), so you end up with un-Clojure-y code.

When we first investigated ClojureScript at work, we built a p.o.c. in Om, then rebuilt it in the (then brand new) Reagent. We liked the functional simplicity of Reagent. We decided not to move forward with ClojureScript back then (we have 150K lines of React.js now, ugh!). I think my default choice these days would be re-frame -- I've built a few toy apps with it. I looked at Om Next and went "nuh-uh!". I haven't tried UIx. Replicant looks interesting, but digging into the examples, it felt more complicated than re-frame... but I might still give it a go some time.

Raul Contreras's avatar

I'm a bit confused by a couple of points in your comment:

Specter is expressive and powerful because it provides a data-oriented DSL that lets you express data navigation and transformation almost like an algebra, with its own types and composable operations. However, you seem not to like it because you consider it a non-idiomatic, non-Clojure-like DSL. Could you explain what you mean when you say that a DSL is not idiomatic?

I think there is a bit of an apples-to-oranges comparison when you say that Replicant is more complicated than re-frame, since they serve completely different purposes. You could, for example, compare combinations such as Replicant + Nexus and Reagent + re-frame. You can even use re-frame with Replicant, since they can be combined. With Replicant, you also get the benefit of having no dependency on React and using a renderer implemented entirely in ClojureScript.

Sean Corfield's avatar

A can feel more complicated than B without them serving the same purpose. As far as I'm concerned, all those things I mentioned are in the "ClojureScript web app" bucket so they are "similar" at that level. Like I say, it's a feeling based on the READMEs. That feeling means I haven't dug deep enough to form a more specific comparison.

Similarly for Specter: my feeling/opinion is that it is non-idiomatic PARTLY because IT STRINGS together ABBREVIATED uppercase words that don't seem self-explanatory. I don't LIKE the UPPERCASE parts and, overall, I do not find it READABLE.