Hacker News new | past | comments | ask | show | jobs | submit login

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.



Redux 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.


Your 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.


I can make a one line program, I wonder how many bugs that would eliminate?


You 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.


It'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.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: