DEV Community

Discussion on: Are you really using JavaScript?

Collapse
 
darthknoppix profile image
Seth Corker

Great list, there are some languages I didn’t know could compile to JS, I’ll have to try them out!

Have you used any of these in the past (sounds like you’ve used Clojure) and what were challenges involved with using another language instead of JS?

Collapse
 
deciduously profile image
Ben Lovy

I've used Clojure, Elm, PureScript, and OCaml from this list, and have Smalltalk on my "to-try" list.

The issues with using each choice are largely unique to that choice, but what you sacrifice by leaving vanilla JS is the ecosystem and support. You severely limit the resources available for troubleshooting, and I often ended up needing to adapt a resource I found to solve a problem in a different language. If the time you spend doing that sort of work is greater than the time saved by using a superior tool, the whole thing isn't worth it anymore.

I'd say for side projects these make a lot of sense, but it'd be a hard sell for a CTO.

Thread Thread
 
darthknoppix profile image
Seth Corker

Great insight, looks like you’ve experimented a lot. The ecosystem is a big plus for JS right now.

I guess it always comes down to:

I'd say for side projects these make a lot of sense, but it'd be a hard sell for a CTO.

Thread Thread
 
deciduously profile image
Ben Lovy

I actually forgot to mention one of the more robust solutions - I think Fable for F# as part of the SAFE stack may be a viable contender, along with ClojureScript, for an enterprise-grade solution. Those two stand out to me as the most generally useful options, here's hoping that maturity continues to increase.

Thread Thread
 
darthknoppix profile image
Seth Corker

I’ve played around with F# but I haven’t properly tried the SAFE stack. That might be a good weekend project to try.

Thread Thread
 
deciduously profile image
Ben Lovy • Edited

I haven't spent a ton of time with it either, but the demo "dojo" project they have set up is really well done and shows you all the moving parts. I'm impressed with the polish of pretty much all the F# resources I've come across.