Reason
  • Документация
  • Попробовать
  • API
  • Сообщество
  • Блог
  • Languages iconРусский
    • 日本語
    • English
    • Deutsch
    • Español
    • Français
    • 한국어
    • Português (Brasil)
    • Українська
    • 中文
    • 繁體中文
    • Помочь с переводом
  • GitHub

›Введение

Введение

  • Что и зачем

Установка

  • Установка
  • Плагины для редакторов и IDE

Основы языка

  • Обзор
  • Let Bindings
  • Primitives
  • Basic Structures
  • Types
  • Records
  • Variants
  • Options and nullability
  • Functions
  • Recursion
  • Деструктуризация
  • Pattern Matching
  • Mutable Bindings
  • Loops
  • Modules

Advanced Features

  • JSX
  • External
  • Исключения
  • Объекты

JavaScript

  • Взаимодействие с JavaScript
  • Шпаргалка по синтаксису
  • Pipe First
  • Промис
  • Библиотеки
  • Конвертация из JS

Дополнительно

  • Часто задаваемые вопросы (FAQ)
  • Дополнительные инструменты
Translate

Что и зачем

Что такое Reason?

Reason is a programming language powered by OCaml's strong type system, and has a syntax designed to feel familiar to people coming from JavaScript or C-family languages.

Примечание: Reason можно перевести на OСaml и обратно с помощью команды refmt. Что можно на Reason также возможно на OСaml и обратно.

Зачем использовать Reason?

Сильная система типов лежащая на основе Reason поможет уменьшить количество багов, увеличит производительность и увеличит возможности рефакторинга вашего кода.

Различные окружения

Проекты позволяющие использовать Reason (и OCaml) в различных окружениях:

  • Native Executables: Using the standard compiler native executables can be built and run directly on your machine.
    • Tools: dune, esy
  • Браузеры: There are several projects that will compile Reason to equivalent JavaScript code that can be run in the browser.
    • ReScript (formerly BuckleScript)
    • Js_of_ocaml

С чего начать?

  • For an introduction to most language features check out the overview
  • To start immediately an online REPL is available at Sketch.sh

Альтернативы

Here are some alternatives that share similar concepts with Reason:

  • Rust. Inspired by the ML family of languages, 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.
  • PureScript. Inspired by Haskell, compiles to the JavaScript.
  • Fable. Based on F#, which is closely related to OCaml.
  • ClojureScript. Dynamically typed language that prioritizes simplicity & great interop.
  • Swift. Language built by Apple, and interoperates with Objective-C well.
  • Haxe. Compiles to basically anything with a focus on game development.
Установка →
  • Что такое Reason?
  • Зачем использовать Reason?
  • Различные окружения
  • С чего начать?
  • Альтернативы