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

Because Clojurescript uses immutable data structures, and keeps the state in a centralized atom, so comparing different states is as easy (and fast) as comparing the different versions of the data structure, which in turn (and thanks to being immutable data structures) reduces to compare their memory references, which is fast.



Immutable.js is a project also from FaceBook that brings immutable data structures to your JS applications including those using React.

Since Clojurescript compiles down to JS, wouldn't it be possible to use Immutable.js and a slightly different app design (a single Flux Store for the entire app) to get the same benefit of using React with Clojurescript?


The centralized immutable state oriented architecture advocated by Om can definitely be implemented using plain JavaScript (my favorite in this space is https://github.com/moreartyjs/moreartyjs), but language features like core.async, transducers and macros are not so easily replicated.


Nitpicking but ClojureScript the language does not keep state in a centralized atom. That's just a common pattern used for Reagent/Om apps.


Centralized state as an immutable data structure is exactly how the app I work with is built. It's plain JavaScript and React. So I don't see how React is "behind" on this front.


Nuclear.js also does this, with pretty idiomatic JavaScript




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

Search: