2 ms·
The complexity would have been too much if I didn't have Clojure and ClojureScript. They let me remove a lot of incidental complexity and deal mostly with the p
by jwr 6y ago
The complexity would have been too much if I didn't have Clojure and ClojureScript. They let me remove a lot of incidental complexity and deal mostly with the problem domain (which is complex enough).
You can do anything with any language/technology, it's just a question of how many resources you are willing to dedicate to the task. In my case, as a solo bootstrapper, the resources are very limited.
Main advantages:
* a single language for both client-side (browser) code and server-side code
* a single data representation (maps with namespace-qualified keys), so no conversions necessary
* spec which helps validate data in multiple places (such as :pre/:post conditions)
* core.async which lets me write asynchronous code both in the JVM and in the browser, same primitives
* a library of excellent sequence manipulation functions
* transducers, which let me build composable data pipelines
* the Rum library which lets me use React as a rendering engine, basically a function of my data
* most of my domain code is shared between the browser and the server
There is more, but these were what I could come up with immediately.
I mostly spend time thinking and working on the problem domain, not writing boilerplate (there is none in Clojure, really).
- palerdot 6y agoIf I may ask, how long have you been working with Clojure? Do you have any resources to recommend to people to get started with Clojure?
- jwr 6y agoI've been using Clojure for about 12 years now. I don't have any specific pointers, but the Clojure web site is a great starting point. There are plenty of talks from conferences, as well as several good books.
- Heliosmaster 6y agoFor a practical introduction to Clojure, check this out: https://heliosmaster.github.io/academy/learning-clojure https://heliosmaster.github.io/academy/learning-clojure It's what I used years ago to learn the language.