Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can only add to that - the hosted nature of Clojure is one of the most underrated awesome features of it. You can write for example a macro that's defined in Clojure code, but to be used in Clojurescript, and changes the behavior of a browser app based on a condition detected in JVM - for example, you can parse some .js library and based on that (clojurescript compiler would) emit modified compiled Javascript code. That stuff is useful for dynamic polyfilling, i18n, css-in-js, feature-flagging, using shims to ensure compatibility, and more.

Moreover, you can have namespaces where Clojure and Clojurescript code is intertwined. I have never seen so much code reusability, even when I was heavily writing for Node. Check this out: you can write specs that would represent your data, alright? Then, you can generate some random collections of data based on those specs. The data that you can use both - on front-end (e.g., for end-to-end testing) and back-end (e.g., for testing the domain logic). You can also use the same specs for validation in UI controls - 'not a valid email', etc. Neat, right?



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

Search: