Write a Blog >>
SLE 2020
Sun 15 - Fri 20 November 2020 Online Conference
co-located with SPLASH 2020
Sun 15 Nov 2020 17:40 - 18:00 at SPLASH-III - Chair(s): Marjan Mernik
Mon 16 Nov 2020 05:40 - 06:00 at SPLASH-III - Chair(s): Friedrich Steimann

Object-oriented programming, functional programming, and metaprogramming each offer a unique axis of abstraction that enables modular code. Macros, a common technique for metaprogramming, capture ASTs as quotes to let users manipulate them in the host language. However, macros are often at odds with other programming techniques since they can only process code written at the call-site and cannot analyze code behind abstraction boundaries such as variables and methods. Furthermore, the quotes generated for macro expansion exist only at compile-time and cannot be passed around in user code. Multi-stage programming treats quotes as runtime values to address this problem, but introduces the cost of running the compiler when splicing quotes. This forces developers to choose between low runtime overhead and modularity. What if we could have the best of both worlds? We introduce fluid quotes, a new technique that uses dependent types to let users pass quotes through abstraction boundaries in runtime code while splicing them ahead-of-time. This technique enables new metaprogramming capabilities by eliminating the traditional requirement of co-locating parameter expressions with call-sites. Fluid quotes capture not only source code but also associated runtime context to ensure correctness. In addition, they can be composed into larger expressions without any macro code. We demonstrate the capabilities of fluid quotes through two specific applications: optimizing data processing pipelines and making language integrated queries more flexible.

Sun 15 Nov

Displayed time zone: Central Time (US & Canada) change

Mon 16 Nov

Displayed time zone: Central Time (US & Canada) change