2 ms·
Here is just one example of what client/server code-sharing makes possible: Hyperfiddle apps are fully CLJC which means literally the same code runs in the brow
by dustingetz 8y ago
Here is just one example of what client/server code-sharing makes possible: Hyperfiddle apps are fully CLJC which means literally the same code runs in the browser for view things, the JVM for web service things, inside Datomic Peer for database things, also Node and soon lambdas. Since they all share the same code, they can coordinate I/O automatically and transparently. Never code network side effect ever again! http://www.hyperfiddle.net/ http://www.hyperfiddle.net/
- zbentley 8y ago> literally the same code runs in the browser for view things, the JVM for web service things No, it does not. The same Clojure code may be the source for both execution environments, but that doesn't mean that the code that runs (JVM bytecode or JavaScript in the browser) is remotely similar, follows the same rules, errors under the same conditions, or otherwise behaves similarly. That's not an argument against code sharing. But please read the post you're responding to thoroughly before you post "I can write it once and run it anywhere" without a whole lot of asterisks after "anywhere".
- deleted 8y ago[deleted]
- yogthos 8y agoYou're correct that there is a difference between execution environments between the JVM and Js. However, in practice you're very unlikely to run into them. My team has been heavily relying on cross-compilation for about three years now. We have yet to run into a scenario where this kind of problems actually came up.
- deleted 8y ago[deleted]