A Better REST with Type level Programming in Scala
summary
Library called Maya (Scala and Scala.js) embeds a type-level DSL so API shape, arguments, local errors and multiplicities live in the Scala type system; a single generic serve function is parameterized by an API type and compiles requests into matching responses. Implementation uses Scala type-level functions, implicit resolution and shapeless-style tricks, produces a working prototype that compiles (IntelliJ has limitations) and mirrors Haskell Servant ideas though it is not yet feature-complete.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 1:16What is Maya
- 3:08The Two Ideas
- 6:15Overview
- 7:25Why should anyone care
- 11:30API Contract
- 15:20Maya
- 17:38GraphQL
- 20:00Infinite Data
- 22:46Finite Data
- 27:10Extensions
- 30:21Local Errors
- 32:01Multiplicities
- 35:33Rich Language
- 36:47Person Requests
- 40:35Atomic Context
- 43:36Request
- 46:00Person Request
- 50:23dsltype
- 52:52Type level functions
- 54:46Defining a type
related talks
49mType level Programming in Scala
51mHands-on Typelevel Scala
45mTypelevel Programming 101: The Subspace of Scala
01h 01mTypesafe Scala, Typelevel Scala – What’s Going On, Anyway?
32mUnderstanding the Type System of Scala 3
38mScalaJS and Typescript: an unlikely romance
41mThe Dialectics of Type-Level Programming
24mLet the Scala compiler work for you
