15 Matching Annotations
  1. May 2023
    1. Emphasizing lifetime-polymorphism can also make type inference untenable, a design choice that wouldn’t fit OCaml.

      References or sources? Why? Presumably there's some research into this?

  2. Dec 2022
  3. Nov 2022
    1. This project file is needed in the root directory of every source tree that you want to compile with Dune. In general, you’ll have a dune file in every subdirectory of the source tree but only one dune-project file at the root.

      dune 文件用来制定每个 sub-directory 如何编译;而dune-project 文件用来指定整个项目的编译配置

    1. let increment x = x + 1

      Ocaml 中函数定义的语法和变量定义的语法基本一致,这让 “函数也是一种数据” 变得更加显然。

    1. There are five essential components to learning a language: syntax, semantics, idioms, libraries, and tools.

      掌握语言的五个要点:语法规则、语义表示、习语定式、库、工具

    1. Parametric polymorphism: Functions and data structures can be parameterized over types. This is crucial for being able to re-use code.

      参数化多态,也就是,范型

  4. Nov 2019
    1. The language for writing React. Reason's creator also created ReactJS, whose first prototypes were written in SML, a distant cousin of OCaml. We've transcribed ReactML into ReactJS for wide adoption. A few years later, we're now iterating on the future of ReactJS through ReasonReact.
    2. Many backing languages would satisfy the previous section's points; the points below, however, have been deal-breakers in our considerations.
    3. The ability to render to native code. OCaml's native (assembly) startup time is in single digit milliseconds. We have big plans to use Reason on native one day; meanwhile, we're focusing on adoption through great JavaScript compatibility.
  5. Oct 2018