Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hm. So there was a bucklescript language/syntax - in addition to ocaml and reasonml?

I'm not sure what to make of:

https://rescript-lang.org/

> This has no impact on the development of the ReasonML language. In contrary, ReasonML can now focus on their goals, as much as we can focus on ours.

Does this mean that ReScript is/will be a language that compiles to js, but not machine code?

And that ReasonML will continue as an ocaml dialect that supports both compiling to machine code (eg for back-end services, native apps) - and to js - using the ReScript compiler? But only interop with ReScript when targeting js?



Bucklescript extends OCaml syntax. OCaml has good support for language extensions. You need adaptations to interface to js.


OK. So ReasonML and bucklescript both extend ocaml syntax? And the bucklescript syntax and compiler is becoming ReScript - distinct from ReasonML.

But the ReScript compiler supports three syntaxi going forward: ReScript(bucklescript), ReasonML and ocaml?

And the ocaml (native) compiler supports ocaml and reasonml - but not ReScript?


Reasonml is an alternative syntax for OCaml. From the user's perspective, there is just one language OCaml, with two alternative syntax OCaml or Reason. If you want to interface to Js you need additional annotation for FFI, no matter which syntax you choose. The Reason syntax includes this FFI https://reasonml.github.io/docs/en/external adapted from Bucklescript, while Bucklescript itself is just OCaml plus the annotation and maybe other compiler directives. The Reason syntax also includes support for React which is not part of OCaml. I don't know what goes under the ReScript umbrella.


More specifically, the Reason syntax has JSX: you can use React without JSX in OCaml/BuckleScript and you can use JSX for non-React things in Reason (either BuckleScript or native).


Thank you, that makes things a little more clear for me at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: