Summary
A talk about functional programming research, type systems, and how an OCaml paper inspired FP libraries in the TS ecosystem.
Includes a live coding section where we implement ideas from HKT research into real world TypeScript projects.
Description
Features like type traits, higher kinded types, and GADTs are thought to be impossible in TypeScript.
This talk will show how advanced contructs of the TS type system can be used to implement exotic features otherwise only found in languages like Rust and Haskell.
- The session will start by covering advanced TS concepts. [4–6 minutes]
- Then, we'll live code functional programming features within the type system (Traits, Functors, Applicatives, etc.). [8–12 minutes]
- Learn about clever tricks used by libraries like fp-ts and Effect. [~2 minutes]
We'll conclude by looking at popular FP libraries in the TS ecosystem, and how they make our code more robust and less error-prone.
This talk is inspired by the following paper about OCaml, and its implementation in the fp-ts library:
https://www.cl.cam.ac.uk/~jdy22/papers/lightweight-higher-kinded-polymorphism.pdf