4 ms·
I have to admit this is the first time I've heard about Reason. Could you help me understand the reason for it? Is this because Microsoft has TypeScript, Apple
by kirillzubovsky 9y ago
I have to admit this is the first time I've heard about Reason. Could you help me understand the reason for it?
Is this because Microsoft has TypeScript, Apple has Swift, and so now Facebook has Reason to keep all your application in your more/less proprietary format?
Further, if you already have React, then why not write everything in React and then just extend it with the features you've built into Reason?
Pardon if these aren't clever questions, but I'd love to understand the big selling points here. Thanks!
- yen223 9y agoReason isn't proprietary - it's essentially just a syntactical skin over OCaml to make it more appealing to JavaScript developers. OCaml has some nice features - algebraic datatypes, complete type coverage, and pattern matching - that would be clunky to retrofit into JavaScript, hence this project.
- chenglou 9y agoHey! It's weird: it's not the first time we get questions like yours and I'm not sure where such confusion comes from! Reason and React are two things. Reason's a syntax on top of OCaml, the programming language. ReactJS' a UI library. Messenger.com _is_ written in React, lots of which are, specifically, in ReasonReact, which is Reason bindings for ReactJS (the rest, plain ReactJS). Reason's open-source, as well as ReasonReact(https://github.com/reasonml/reason-react https://github.com/reasonml/reason-react). Using BuckleScript the OCaml-to-JS compiler, we compile to normal JS code with minimal runtime. Here's why we made it: https://reasonml.github.io/guide/what-and-why https://reasonml.github.io/guide/what-and-why