3 ms·
Yes, but JavaScript is flexible enough to allow persistent data structures, and a value-semantics API for working with them, to be implemented in terms of a lib
by michaelsbradley 13y ago
Yes, but JavaScript is flexible enough to allow persistent data structures, and a value-semantics API for working with them, to be implemented in terms of a library:
http://swannodette.github.io/mori/ http://swannodette.github.io/mori/
Just to avoid confusion: mori the library, as distributed by npm, is already compiled. Building the library itself requires a compile step, but an end-user just needs to load it with a script tag or require("mori").
- cgag 13y agoTo be fair it's implemented in Clojurescript I'm pretty sure.
- michaelsbradley 13y agoIt is, but pre-distribution it is compiled down to 100% JavaScript as a stand-alone JS lib that you can load with a script tag or NodeJS require(...). The ClojureScript compiler only gets involved if you want to hack on mori yourself, as opposed to consuming it as a library. If the point you're making is that it's implemented with ClojureScript as opposed to JavaScript, the fact is that everything that ClojureScript "does" you can do with hand-written JavaScript, but your hand-rolled solution might not be as generic or efficient (depending on your JS chops).