▲ | nine_k 11 hours ago | |||||||||||||
Fortunately, the OCaml compiler is very modular, and there have been efforts to make things more... reasonable. - Reason, a different syntactic frontend for regular OCaml: https://reasonml.github.io/ - ReScript, a language with OCaml semantics that compiles into: JS https://rescript-lang.org/ (I suppose it's a reincarnation of js-of-ocaml). | ||||||||||||||
▲ | obeavs 19 minutes ago | parent | next [-] | |||||||||||||
Worth nothing that the former lead dev of ReScript left to create a WASM-first language call Moonbit (https://www.moonbitlang.com/). The language design is awesome and corrects a lot of the corners that they just couldn't get around in OCAML. A touch early, but really well done. | ||||||||||||||
▲ | jey 9 hours ago | parent | prev | next [-] | |||||||||||||
ReScript is better described as a descendant (and fork) of ReasonML aimed to fit into the JS ecosystem. In contrast to js_of_ocaml, ReScript prioritizes interoperability with existing JS code and APIs over interop with existing OCaml code, whereas js_of_ocaml takes the opposite approach. So people looking for an improved version of JavaScript or TypeScript should probably choose ReScript, but people who are porting an existing OCaml program might prefer js_of_ocaml. | ||||||||||||||
| ||||||||||||||
▲ | RandomThoughts3 3 hours ago | parent | prev | next [-] | |||||||||||||
It's not more reasonable. It explicitely designed to look like JS which is, well, bad. Some of the choices are extremely annoying and overall useless like reintroducing parentheses for function arguments. There is a reason - pun intended - it didn't take off at all with the community. | ||||||||||||||
▲ | JoelJacobson 9 hours ago | parent | prev | next [-] | |||||||||||||
I love the idea of Reason/ReScript. I hope they can figure out a way to work together and join forces somehow, the contributions to both repos seems to have faded over the last years, but maybe that's because the projects have stabilized, I don't know. I've had lots of fun playing with Reason a few years ago. I created an interactive real-time visualization tool, to see a Regexp transform into a NFA to DFA to minimal DFA graph: http://compiler.org/reason-re-nfa/src/index.html It only works for basic regexes though. | ||||||||||||||
| ||||||||||||||
▲ | BrawnyBadger53 9 hours ago | parent | prev [-] | |||||||||||||
I feel like ReasonML should have the capacity to help bridge the gap for people learning ocaml if it weren't so hidden. |