2 ms·
That's a very interesting question. We could ask some Messenger and Instagram people, since they are heavily using BuckleScript. In general output JS is already
by yawaramin 9y ago
That's a very interesting question. We could ask some Messenger and Instagram people, since they are heavily using BuckleScript. In general output JS is already fairly spartan, because BuckleScript uses a few tricks here and there, like encoding modules and records as arrays instead of objects; and completely inlining functions whenever it can.
BuckleScript also emits ES6 modules, with imports and exports, and it marks its output as either pure or impure at the module level. So potentially there's a lot of room for bundlers to do tree-shaking.
Bob Zhang, the BuckleScript team lead, is working on a new typesafe standard library for BuckleScript, which takes advantage of compile-time checks to compile to extremely minimal and idiomatic JS. Exciting times up ahead!
- Hurtak 9y agoI have heard about the Messenger where they have 25-50% of the web client codebase in Reason, but I have not heard about the Instagram story. Can you share more info or some links about that?
- yawaramin 9y agoHi, about Instagram, I was mistaken about 'heavy' use. As far as I know there is one guy using Reason in Insta and from what he's said, he's found it pretty straightforward. I don't have a direct link, but if you search for 'instagram' in the ReasonML Discord chat you will find the discussion.