Hacker News new | ask | show | jobs
by Drup 3056 days ago
I know, hence my question! Why go through bs (which is locked to an old version of OCaml) to distribute executables, when you can use the normal compiler and enjoy the latest improvements?
1 comments

I don’t mean to ignore your observation - it is valid. Bsb is a build system that works with a specific form of packages. What you suggest could work too. The only (small?) challenge is that people have bsb JS projects, and they aren’t configured for jbuilder/Dune etc. Because of JavaScript’s immense popularity, the largest number of people will start with whatever build tools integrate well with the JavaScript ecosystem and work from there. This plays out quite predictably. Just as an example, the most important thing to web developers is that each Reason input file becomes a commonJS (or es6) module. That allows integrating your Reason React app with existing web apps easily. So since people start with whatever tools integrate well with the JS ecosystem, they then reach for the easiest tool available to adopt native compilation.