Multi-stage Programming in the Large with Staged Classes
summary
Introduces staged classes implemented in the Squid Scala framework to generate class and module definitions with static typing and scope guarantees, producing concrete classes via runtime-compile so abstractions like a generic fold are zero-cost abstractions in the generated code. Shows parameterized staged classes (arity and element type via reified implicits), caching of specializations with @cached to avoid duplication and cycles, and two apps: a type-safe csvProvider that guarantees well-typed generated types and a staged DB compiler that generates specialized container and query-executor classes.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:13Two approaches to high-perf. programming
- 1:19Limitations of Multi-Stage Programming
- 2:30C++ template metaprogramming
- 2:49Staged classes for MSP in the large
- 3:39Uses of Staged Classes
- 4:05Outline of the presentation
- 4:22The Squid framework
- 4:50Quasiquotation in Squid
- 5:57Classes in Scala: Vector Example
- 8:24Staged Vector: Generalizing the Arity
- 9:15Staged Vector: Generalizing the Element Type
- 10:06Staged Classes: Specialization and Sharing
- 10:56Type-Safe Implementations of Type Providers
- 12:01Use Case: A Staged Database System
- 13:30Conclusions on Staged Classes
related talks
25mStaging with Class: A Specification for Typed Template Haskell
41mThe Dialectics of Type-Level Programming
12mMulti-Stage Programming with Generative and Analytical Macros
36mDependently Typed Multi-Stage Programming, Revisited
24mScoped and Typed Staging by Evaluation
15mStaged Compilation with Two-Level Type Theory
35mRestaging Domain-Specific Languages: A Flexible Design Pattern for Rapid Development of(…)
29mSafe Pattern Generation for Multi-Stage Programming
