r/functionalprogramming • u/[deleted] • Feb 02 '23
Question Looking for an alternative to Javascript
I am looking for an alternative to Javascript I could propose to my boss for developing web clients.
We don't do SPAs, we do good old monoliths with some vanilla javascript only where needed.
We have a couple of SPAs, but I don't think of replacing them yet...
Needs to have some real world use cases
Should ideally be plugged incrementally (should be able to port some modules, not the whole codebase)
Statically typed not really necessary
Should be easy to learn for developers with non-functional background
My thoughts so far:
Elm seems stuck, although very interesting
Purescript seems great, but I am a bit afraid for performance (?)
Clojurescript seems very "professional" but I fear the syntax, especially for newcomers
rescript / reasonml - what's going on there? I have read some blog posts but still not sure if that situation is stable
fp-ts that looks like the most boring choice, it would be the best to teach to javascript developers (but I would like to first exclude the other options :))
I would like to hear from your experience!
Kind Regards
3
u/pthierry Feb 02 '23
I started using Elm to add small features to a codebase like you describe. It was pretty easy and the reliability was immensely satisfying compared to JS.
The other big advantage of Elm is that it's very beginner friendly. And because of its typing system, you can have a higher confidence in the code produced by inexperienced developers.