Live data from Hacker News

Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples

github.com

21–30 of 31 posts

Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples

#21
post #7

Earlier quoted context omitted.

Differences from js_of_ocaml (not an easy find) Js_of_ocaml takes lowlevel bytecode from OCaml compiler, BuckleScript takes the highlevel rawlambda representation from OCaml compiler Js_of_ocaml focuses more on existing OCaml eco-system(opam) while BuckleScript's major goal is to target npm Js_of_ocaml and BuckleScript have slightly different runtime encoding in several places, for example, BuckleScript encodes OCaml…

I haven't really gotten into much ML yet, and I'm curious to hear what people knowledgeable with OCaml think about http://facebook.github.io/reason/ The name makes it impossible to research to find any blog posts or anything, but the familiar syntax alone might make it at least a first step for me.

The search term is reasonml.

Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples

#24

Why?

You should give one of the OCaml languages a try. OCaml or F#. They have some very pleasant properties.

Generally this whole idea would make sense when you are writing a web application and you are using OCaml or F# on the server and want to use it for the client code too. Same justification for using node.js, but in reverse.

But I know that the Ionide plugin for Atom and VSCode is written in F# compiled to javascript just because the developers like to code in F#

Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples

#27
post #23

How is the performance? Imho, we need an equivalent of the "great programming language shootout" for all the AltJS languages.

For bucklescript, the performance is excellent, better than handwritten JS: https://github.com/bloomberg/bucklescript#more-examples-1

Re: Compile OCaml to JavaScript, use ReactJS, bindings to ReactJS, several examples

#30

ClojureScript is better than that, except for the type system.

It's probably worth elaborating your opinion here. I've used ClojureScript heavily and feel I have a good sense of the comparison, but someone else reading your comment wouldn't be any better informed for it.

I'm genuinely curious as to your comparison though, would love to read it!

Post reply on HN