为什么选择 Reason ？
“何苦学一门 全新 的语言呢？”
This isn't what Reason is about.
However, it's unclear which features of JS to reshape, in order to fit it into the mold of a language designed around fast semantics and sound typing. But we can work backward, from a language that has been designed from the ground up around performance and safety, and make some adjustments so that it looks and acts a bit more like the better part of the familiar web language we've come to know.
- 坚如磐石的类型系统 OCaml 的类型具有 100% 的覆盖率（每一行代码），推导（类型可以被推导出来，无需手写），和健壮性（一旦编译完成，保证类型准确）。
- A focus on simplicity & pragmatism. Reason allows opt-in side-effect, mutation and objects for familiarity & interop, while keeping the rest of the language pure, immutable and functional.
bsb, which finishes incremental builds in less than 100ms. The resulting output is also tiny.
- 强大的生态圈和工具链 使用你最爱的编辑器，你最爱的 NPM 包，以及任何你最爱的已有技术栈。
为什么选择 Ocaml 作为后端语言？而不是 [我最爱的那个语言]？
Many backing languages would satisfy the previous section's points; the points below, however, are important features of the OCaml language that make it particularly well suited as a foundation for Reason.
- 副作用，可变操作和其他紧急方案 这些通常不是一门语言的闪光点。但是对于 Facebook 来说，能够在没有精心设计的互操作/重写的情况下拥有桥接代码库的能力是至关重要的。 OCaml 默认是不可变和函数式的代码，但是仍有让刚开始接触时可能会更简单的紧急方案。
- Implementation polish matters. OCaml has been refined over two decades and gets better every year.
- 编写 React 的语言 ReasonReact demonstrates how naturally React patterns play to the strengths of OCaml/Reason, and ReactJS itself was inspired by the functional, yet pragmatic philosophy of the ML family of languages (as described in the React To The Future talk by jordwalke).
- Welcoming, growing community. The Reason community is welcoming of newcomers. The community has members from all over the world. Join the Discord channel and ask for help. Stick around to share what you've learned with other newcomers.
Reason isn't for you?
Here are some alternatives that share some similar concepts/lineage with Reason/OCaml, but often with a different focus:
- OCaml. Reason is a syntax and toolchain built on top of the OCaml language. OCaml and Reason interoperate with eachother OCaml. You can compile plain OCaml with BuckleScript, and Js_of_ocaml can work with Reason as well.
- Rust. Inspired by the ML family of langauges, but not garbage collected. Has excellent parallelism support.
- Elm. Another great language in the ML family. Focuses on building web applications. See the widely praised talk on Elm, Let's Be Mainstream.
- Fable。基于 F#，与 OCaml 密切相关。
- ClojureScript. Dynamically typed language that prioritizes simplicity & great interop as well. Doesn't appear to have much in common with ReasonML. Shares some functional roots with the ML family of languages.
- Swift. Language built by Apple, and interoperates with Objective-C well. Uses reference counted collection (but without automatic cycle breaking).
- Haxe. Compiles to basically anything with a focus on game development.
Want to know more? Strike a conversation with anyone in the community!
Reason is an open source project that started at Facebook but that is heavily community built/organized.