People talking about ReasonML as if it was a language became so much of a pet peeve for me that I wrote a reusable response. ;)
ReasonML is an alternative syntax for OCaml. OCaml can be compiled to native code on multiple platforms with the official backend or to JS with BuckleScript, regardless of the concrete syntax you choose.
By thinking that ReasonML is a language that compiles to JS people are missing both the native code option and the other syntax.
ReasonML is a gateway drug to Ocaml. :)
Ya, the first time you get a non-trivial non-exhaustive pattern match error at compile you’re hooked.
Good point! I didn’t mention that part, but good to point out!
I’ve also had a light interest in ReasonML for the passed few months and plan to explore it further this year. What’s really got me interested is Revery, a React-like framework that compiles to web and native. To me, this sounds like a great alternative to Electron apps.
If you appreciate what ReasonML brings to the table, then you might appreciate looking at reflex-frp which facilitates using Haskell both in the frontend and the backend (think Elm, but without any of its limitations, and being able to share types between server and backend). Here’s an example app.
See this talk by Ryan Trinkle for a demo.
It’s worth warning folks that the “easy install” touted on the Reflex page involves first installing and (if going the Obelisk route at least) configuring Nix. If you haven’t already used Nix and/or GHCJS then I wouldn’t suggest this as your first exposure to Haskell (or any of these technologies). The ~16mb runtime for GHCJS (last time I checked, summer 2018-ish) is also pretty terrible, although I suppose that’s neither here nor there for some basic experimenting.
This is not to say that these technologies aren’t great in context, just that they may not be the best place to start for some people.
While it’s not the same as “Haskell everywhere” it’s worth looking at PureScript as a Haskell-like experience in the frontend that is far easier to get up and running, especially for anyone already familiar with the current JS ecosystem.
The JS of https://slownews.srid.ca (an obelisk app) is ~3.8M.
I stand corrected–much smaller than the last time I checked.
I, personally, will be focusing on Golang. The main reason being that it seems to be fairly decent for getting a job, a big part of the Kubernetes world (lots of apps are written in it) and you can write a webapp or microservices without any 3rd party frameworks.