Hacker News new | past | comments | ask | show | jobs | submit login

Reason = syntax for OCaml. Bucklescript is a transpiler to js. You can use other transpilers if you want but Bucklescript is great and has tightly integrated support. The best way to experience it is to just follow the "npm install" instructions. It may be a little confusing since you install Bucklescript, instead of Reason, as Reason is a syntax that Bucklescript supports. The online playground works great as well if you just want to get a feeling about the language.

Can bucklescript compile OCaml into js?

Yes that is what it was designed to do. Of course if your code calls out to some library implemented in native you will need to substitute with the js equivalent. Bucklescript has special syntax for you to describe the FFI to js, like Typescript. Otherwise it is OCaml in classical syntax or in Reason.

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