Fluid Quotes: Metaprogramming across Abstraction Boundaries with Dependent Types
summary
Fluid Quotes uses dependent types to carry serialized code through the type system so macros can serialize AST in string literal types and later spliceCall at the call site; quote and splice are implemented as macros that track closures, substitute stable public paths to avoid runtime closures, and rewire parameters when splicing. The authors build a pipelines library that fuses streams across abstraction boundaries (example shows a 2.7× speedup) and add a lightweight Quill layer to generate SQL at compile time; benchmarks report significant improvements.
AI-written summary · about
chapters (8)
- 0:00Intro
- 0:39metaprogramming limitations
- 5:34avoiding closures
- 6:49generative macros with fluid quotes
- 8:20stream processing - pipelines
- 10:18stream processing - complex graphs
- 11:36stream processing - pipeline benchmarks
- 12:07flexible metaprogramming for LINQ
related talks
48mMetaprogramming in Dotty
20mFluent APIs in Functional Languages
20mFlux: Liquid Types for Rust
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
43mAdventures in Metaprogramming: Macros versus Shapeless
42mAvoiding macros with inline and derived
01h 02mHydroflow: A Compiler Target for Fast, Correct Distributed Programs
41mThe Dialectics of Type-Level Programming
