ReScript (previously BuckleScript and Reason)
rescript-lang.orgRecent and related: https://news.ycombinator.com/item?id=24119838
I get that people don't like learning new and unfamiliar things, but OCaml's syntax is actually pretty nice, and the editor tooling is a lot better. ReasonML has some nice ideas like more sensible parsing of types and automatic variant to function conversions, but even so I don't think the syntax fragmentation is worth it.
I started a native ReasonML project but eventually converted the project to OCaml as I became disillusioned with the relative verbosity and noise compared to straight up OCaml.
Don't be afraid to learn something new, especially if it looks weird or inscrutable. Things are rarely weird for the sake of weirdness, and you'll expand your horizons and perspectives, eventually understanding (and maybe even liking) why things are the way they are.
This applies to functional programming, Lisp, array languages, etc. The intellectual laziness of programmers never fails to astound me. Excuses for why only the things they currently know are somehow the best. Comments like "X is the best because I don't know anything else" are so common it's sad, even among senior software engineers.
I used ReasonML and Bucklescript for a self-contained part of a massive Typescript project to try it out and it was a joy. Here's hoping more people find out about it and it gets some more widespread adoption.
I'm confused, so reasonml is now rescript?
ReScript is specifically ReasonML with Bucklescript, which is for transpiling down to Javascript. They also made a few minor syntax changes that make it look a bit more like Typescript.
I think it's just when you use ReasonML in conjunction with Bucklescript to target JS. If you're using ReasonML to compile natively then things are the same.
I'm even more confused.
It's like all of BuckleScript and parts of ReasonML is now ReScript. Except BuckleScript has a new C-like syntax unlike the ML syntax that made BuckleScript BuckleScript as opposed to ReasonML.
Basically Bucklescript have forked their own (very similar) syntax from ReasonML and branded the whole syntax + Bucklescript + compiler package as ReScript. I suppose the goal is to eliminate the confusion of having so many moving parts and unify them all under a single ReScript brand.
Thanks. I guess the thing I didn't understand was where this leaves Reason: what is left under the Reason banner? But a fork would explain the overlap.
Lots of things are under the Reason banner:
- The Reason syntax at https://github.com/facebook/reason
- Esy, the npm-like Opam-compatible package manager at https://esy.sh/
- Reason native tooling in https://reason-native.com/
- Not forgetting that Dune and Odoc, two standard tools in the OCaml ecosystem, both support Reason syntax.
EDIT: and I forgot about the various editor plugins which provide Reason support, the most well-known is probably https://marketplace.visualstudio.com/items?itemName=jaredly....
Reason is still an alternative syntax to OCaml for native development, although I have no idea how many people actually use it for that.
Dropping the semicolons, all the brackets, and other JS-y syntax of ReasonML in favor of something more OCaml-y makes this a lot easier to read. I'm super confused at a capital U being the sigil for uncurried functions; it just is not a convention I'd expect from a modern language.
It's not a sigil, it's just a naming convention. For example, in the OCaml world there's a convention for functions that throw exceptions to have a '_exn' suffix. In Haskell there's a convention for monadic function to have an 'M' suffix.