Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore a 32-minute video presentation from ICFP 2023 introducing MacoCaml, a novel design and implementation of compile-time code generation for OCaml. Delve into the unique combination of macros with phase separation and quotation-based staging, where macros are treated as compile-time bindings and expressions cross evaluation phases using staging annotations. Learn about the theoretical foundation of MacoCaml through the formalization of a typed source calculus called maco, which supports interleaving typing and compile-time code generation, references with explicit compile-time heaps, and modules. Discover the crucial properties studied, including soundness and phase distinction. Gain insights into the implementation of MacoCaml in the OCaml compiler and the successful porting of two substantial existing libraries. Access supplementary materials, including artifacts available for reuse, through the provided links to enhance your understanding of this innovative approach to compile-time code generation in OCaml.