r/functionalprogramming • • 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

14 Upvotes

50 comments sorted by

View all comments

Show parent comment

2

u/noomey Feb 05 '23

Isn't it a bit early to recommend using Gleam in professional environnement?

2

u/nilsecc Feb 05 '23

They said they are literally using Elixir/Phoenix and LiveView, (which isn't even 1.0 yet) and just need a little bit of JS to glue stuff together. So in this context, it's probably pretty safe.

2

u/Puzzleheaded-Lab-635 Feb 06 '23

They are using Elixir/Phoenix/LiveView (LiveView isn't even 1.0 yet). Gleam is already being used in this context for the very very little JS you would need for what LiveView cant do.