3 ms·
Because of it's lisp nature with special braces I find it to be nicer for creating DOM than HTML : [:div [:p "I am a component!"] [:p.someclass
by rafaelmn 3y ago
Because of it's lisp nature with special braces I find it to be nicer for creating DOM than HTML :
[:div
[:p "I am a component!"]
[:p.someclass
"I have " [:strong "bold"]
[:span {:style {:color "red"}} " and red "] "text."]]
really has that "first class" feel when you're working with it rather than feeling tacked on like JSX - at least that's how I remember it.
My main problem with Clojure was the dynamic nature of it. I have not used it in very long time now (probably 7 years at this point) - but despite the amazing aspects of it I would not trade in TypeScript annotations.
A question for clojurists here - what is the level of static type checking adoption in CLJ world ? When I was using it last time there were some things like schema validators, but nothing like TypeScript. It looks like there's static typing annotations support now but are the types widely used by popular projects/provided for big libraries ?
- jwr 3y agoFrom the point of view of a solo developer maintaining a large app over many years: I would not want to deal with static type checking and I would not find it useful, except for simpler subsets of my code. I do use spec, and I've used other checking solutions before. I also use :pre/:post conditions a lot, as well as plenty of assertions. But in a large and complex application the errors I'm likely to run into are not as simple as a mismatched type. My most valuable checks and specs constrain multiple data fields. Thinking about stuff I run into, I would say that the majority of errors are due to optionality — where a key is optional in some contexts, but mandatory in others.