The Open-Source Libraries Powering Fresh Building Fresh would have been insanely hard if it weren't for these libraries. Packages specifically useful for building a TUI text editor: Crate One-Line Summary arboard Cross-platform acesss to the system clipboard (CTRL+C for the win) crossterm Terminal manipulation, handling input, cursor movement, and colors across platforms (backend for ratatui) deno…
infernu uses row-type polymorphism to propagate read/write capabilities on record fields. Using row-type polymorphism to describe more than just which fields are present bears a vague resemblance to polymorphic constraints.
Here’s a simple example of recursive types interacting badly with subtyping: T={ foo: T -> A} U={ foo: U -> B} Consider T <: U, therefore (T -> A) <: (U -> B) Which implies: U <: T So T <: U but also U <: T, which is true iff A <: B and B <: A.
Compared to other tools adding static types to JavaScript, Infernu’s main strengths are full type inference and strong type safety. Here are a few examples.