we will end up with clj -M borkdude.add io.pedestal/pedestal.service 0.5.8
@souenzzo That doesn't look quite right... clojure -M -m borkdude.add ...
maybe?
I'm still a bit confused with that new clj stuff 😅
Question: do you think that React is declarative? and why?
Let me know when you have the @vincent.cantin Declarativeness Scale ready, I will measure #matrix. 🙏
I became hesitant to write that scale, for multiple reasons: • It’s not so simple, because it’s not on a 1 dimension axis. • It implies judging existing frameworks / libraries to place them on the scale. Doing so might start a flame war which would distract me from my work on Vrac. • It implies that I would know what I am doing, which is not granted.
Declarativeness is mostly about being able to clearly define a particular problem space. I think it's reasonable to say html is a declarative solution to the document representation problem, and react.js is a declarative solution to the document mutation problem. Declarativeness failures happen when the problem space becomes too broad or too vague, then your elegant DSL ends up bloated with turing-complete escape hatches. A modern webapp is considerably more complex than a document, html is not an acceptable declarative solution in that problem space, hence javascript. react.js kind of embraces that mismatch and still requires a fair amount of imperative logic to do anything useful.
I ask because it's written that React is declarative on its website and I disagree. Funtions are not readable.
I guess it’s that you’re not manipulating DOM manually, but giving a “declaration” how you want the DOM to be in terms of React components.
In that sense I do think it is declarative.
I'd say that React is more declarative than jQuery (don't write how the change to the DOM should be made, just write what you want), but less declarative than pure HTML, which just is (no functions).
To say what @valtteri said in different words, you're essentially generating a declarative structure. There's ongoing changes right now to make react based more on data structures (don't know the details, sorry!). All of the function calls currently just generate an object. You could call a react-dom-generating-function and parse the output if you like.
I think that react is declarative because every thing returns a data structure, over "do something and return nil" I think that react is not that declarative because the data struture returned by functions is opaque/hard to understand/manipulate
Where on the spectrum of declarativeness do people think something like Enlive sits? That always felt more agnostic to the actual DOM tree and processing pipeline to me.
Made some progress this weekend on https://github.com/borkdude/glam, a new package manager that's designed to easily install executables in CI and for local directories/projects. Welcome to try it out or PR packages here: https://github.com/glam-pm/packages