4 ms·
To add one data point; I rewrote one of our applications that was Redux+React+Typescript with exact feature parity in Re_Frame+Reagent+Clojurescript. It was 4.7
by Clever321 8y ago
To add one data point; I rewrote one of our applications that was Redux+React+Typescript with exact feature parity in Re_Frame+Reagent+Clojurescript. It was 4.7x less code. We continued development on the cljs app and abandoned the typescript app. Months later the app is ~17,000 LOC. I shutter to think how the equivalent typescript would have turned out.
- nwienert 8y agoRedux is verbose but there are far less verbose options for React+Typescript. I find clojure/script to be too dense for my taste in most examples. I actually really prefer a few more LoC, so that's a poor metric for effectiveness. Your IDE can deliver far more savings in time while encouraging more LoC often.
- rlander 8y agoYour taste has nothing to do with effectiveness. There's plenty of evidence that loc are one of the most reliable predictors of # of bugs in a codebase.
- nwienert 8y agoI can make a one line program, I wonder how many bugs that would eliminate?
- yogthos 8y agoYou don't have to write dense code in ClojureScript. Most functions I write are general purpose and end up being 5 ~ 10 lines of code. These general purpose functions can then be composed to do declarative data transformations. This results in code that's largely declarative where what's being done is decoupled from how it's done. It's not just about having less code, but about eliminating noise and incidental code. My experience is that ClojureScript does a very good job in this regard compared to most alternatives such as TypeScript.
- bribri 8y agoIt's denser because there are so many lines of assignment statements in other languages. Though the temp vars provide some form of documentation, I still prefer to focus on compositions of pure functions and tests.