Comment by robto

7 years ago

You can live that dream in clojure land! Clojurescript on the front end, Clojure on the backend, and datalog/honeysql for the database if you'd like. And it is awesome! After using a stack like this I'm spoiled for the slog that is developing in separate languages for each of those things.

I think that dream is possible with OS usecases as well, it's just that nobody has made it work yet. And I can't think of a better way to eventually get there than to build it slowly out of free and open source software. It might take a while, but since people have the ability to adapt the software to their needs when it is free, I'm confident with time that it will serve those needs.

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/

I'm glad it's working for you. My usual work involves python, javascript, and occasional SQL, and really the syntax is not that much of an issue. The problem space difference matters a lot more (for me) than the syntax (which an IDE can help me with anyway).

I think part of the motivation was also managers thinking they could easily shuttle developers between frontend, backend, and database work, and that has mostly not worked out, because what takes time to learn about each is not the language, it's the problem space and the tradeoffs.

But, if it's working out for you, I'm glad it is. I was not impressed.

You can live that dream in clojure land!

Spending 70% of your time doing tedious interop doesn't sound like living the dream ;)

  • For what it's worth, I've been writing Clojure since 2013 and I can count the number of times I've had to write interop code on one hand. And in those cases it was a wonderful escape hatch! That's probably more reflective of the type of projects I've worked on than anything else, but it's my experience and I don't think it's that unusual.