Comment by themacguffinman
7 years ago
It never works out that way though.
Clojure for the frontend? What about native APIs that you need to use on, say, iOS or Android? What about graphics libraries and APIs? What about browser APIs? I'm sure you can write your own wrapper or bindings for whatever you need, but it's an ongoing effort/pain that isn't worth it for most people.
Every platform, backend or frontend, supports specific languages that are suitable for the platform's problem space and are subsequently preferred by the platform's community. Software rarely stands alone. You can always go against the grain with your own efforts, but it's no longer a dream, just another compromise.
In my experience, it works just fine.
Clojure for the frontend is the best-in-class frontend dev environment that I've worked with. Instant hot code reloading, a browser-connected repl, great debugging tools, and a really nice collection of libraries for getting stuff done. I've never had to use native APIs for iOS and Android, so I can't speak to that from experience, but I know that there's some really nice machine learning work that's done in Clojure[0]. One of the main bits of Clojure philosophy is to just embrace the host platform, and our company has done that very successfully.
I think I agree that there are compromises, but on the whole I've come out pretty far ahead with the tools I get to use. My point, though, wasn't to proselytize for Clojure (even though I do love it!), but to point out that there are ecosystems that have made significant progress towards this idea of convergence, and that some people (me in particular) are very happy to be moving in that direction. I'm excited to see progress on the OS front.
[0]https://dragan.rocks/
In that land, what are you doing about UI? Still falling back on Java?
Nope! Usually if I need ui I reach for Clojurescript, but if I need something "native" I go for cljfx[0], a wrapper of javafx. But it's so much better than javafx - you get a really nice repl-driven, live coding plaform with functional state management and smart re-rendering.
[0]https://github.com/cljfx/cljfx
2 replies →