Reason
  • Docs
  • Try
  • API
  • Community
  • Blog
  • Languages icon中文
    • 日本語
    • English
    • Deutsch
    • Español
    • Français
    • 한국어
    • Português (Brasil)
    • Русский
    • Українська
    • 繁體中文
    • 帮助翻译
  • GitHub
Hello! This particular page hash has moved to . Please update the URLs to reflect it. Thanks!
Reason
type schoolPerson =
  | Teacher
  | Director
  | Student(string);

let greeting = person =>
  switch (person) {
  | Teacher => "Hey Professor!"
  | Director => "Hello Director."
  | Student("Richard") =>
    "Still here Ricky?"
  | Student(anyOtherName) =>
    "Hey, " ++ anyOtherName ++ "."
  };
type schoolPerson = Teacher | Director | Student(string);

let greeting = person =>
  switch (person) {
  | Teacher => "Hey Professor!"
  | Director => "Hello Director."
  | Student("Richard") => "Still here Ricky?"
  | Student(anyOtherName) => "Hey, " ++ anyOtherName ++ "."
  };
Reason 可以让您编写简单,快速和优质的类型安全代码,同时利用 JavaScript 和 OCaml 的生态。
在线试用
Quick Start

毫不费力的类型

强大,安全的类型推导,意味着你很少需要手动标注类型,所有内容会自动为你检查。

Use the power of the OCaml ecosystem

Get access to the powerful systems programming language OCaml with an easier to learn syntax. Use js_of_ocaml to compile to JavaScript!

Reason 的用户

FacebookMessengerOneGraphViskaBeOpSocial TablesBroadsheetToughbyteg2i.coTinyRungAstrocodersAhrefsDernier CriBacktraceMobilunityAppierInVisionCoursebaseImandra IncTail RecursiveGangverkLaTeX Baseohne-MaklerSotheby's上线了 SXL.CNJoinUpLenus eHealthPupilfirstnittygrittyLeon SoftwarexorlabcodeheroesControl Center AppsruangguruDraftbitQwickReveryOnivim 2O(1) LabsminimaIteamAstrolabe DiagnosticsAuditlessCutiiBand ProtocolRaditycodecentricTradie TrainingPorterOxidizing SystemsTenzir
查看完整列表