fakenickels / fakenickels-blog

fakenickels - Hi, I'm fakenickels
https://blog.fakenickels.dev
6 stars 1 forks source link

How many Reasons are there? #11

Open fakenickels opened 3 years ago

fakenickels commented 3 years ago

Native Reason, ReasonML BuckleScript Flavor, REScript even OCaml?! WTF are you guys doing?

Native ReasonML (or Reason Native), .re files

Native Reason is just a syntax of OCaml and is interchangeable with OCaml. Native because you can use it directly with dune or any other OCaml tooling and in the end you compile your project/code to a binary.

ReasonML BuckleScript flavor, .re files

It's the most known Reason by JS developers. It presents the same specs of Native ReasonML with the few additions of BuckleScript specific syntax which include:

As they are BuckleScript specific additions they do not exist in Native Reason. Therefore, they won't work in there if you are compiling your reason with dune.

REScript, .res files

REScript is a Native Reason inspired language to make it even easier for JS devs. The main characteristic of it is that unlike pure ReasonML it is not interchangeable with OCaml thus we can't use the same OCaml tooling with it.

ReScript is ReasonML + BuckleScript. BuckleScript was rebranded as REScript.

Retweet this

Subscribe to the Fake News channel to get blog posts and content updates!

gladimdim commented 3 years ago

Wow. I thought ReasonML was just rebranded to REScript. Did not know it is a completely different implementation and goals.