Hacker News new | ask | show | jobs
by giraffe_lady 1043 days ago
ReScript is excellent. Same type system as ocaml, which is IMO the sweet spot between power and straightforwardness. You lose the "you can represent ANYTHING" capability of TS which is both a pro and a con. In exchange it's much simpler to work with and has excellent type inference for day to day work.

The externals binding system for JS libs works well for integrating libraries. And react bindings are included in the standard lib, they also work great. The compiler is fast and produces generally quite reasonable JS.

You could argue that it's not "better" than elm in a theoretical sense. But for practical work it's much closer to the mainstream of web dev in mindset and syntax. Easier to learn, much easier to integrate with other frameworks or into existing teams & codebases. And it's less opinionated about rendering: the tooling generally assumes you're using react, but you don't have to and it can emit anything if you do some extra work wiring it up. I have used it with node and even, irresponsibly, deno fresh.

Been using it whenever I can for frontend stuff for a year now and haven't enjoyed a language this much since... well... elixir.