Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences 2018
DOI: 10.1145/3278122.3278139
|View full text |Cite
|
Sign up to set email alerts
|

A practical unification of multi-stage programming and macros

Abstract: Program generation is indispensable. We propose a novel uni cation of two existing metaprogramming techniques: multi-stage programming and hygienic generative macros. The former supports runtime code generation and execution in a type-safe manner while the latter o ers compile-time code generation. In this work we draw upon a long line of research on metaprogramming, starting with Lisp, MetaML and MetaO-Caml. We provide direct support for quotes, splices and toplevel splices, all regulated uniformly by a level… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
7
0

Year Published

2019
2019
2023
2023

Publication Types

Select...
3
2
1

Relationship

1
5

Authors

Journals

citations
Cited by 14 publications
(7 citation statements)
references
References 35 publications
0
7
0
Order By: Relevance
“…The aforementioned syntactic mondalities are introduced to denote where the evaluation needs to be deferred and we already cross the boundary of semantics-preserving code. At this point, we can navigate and guide freely the process of generating code from a quoted domain-speci c language as shown in past work [6,10,13]. The macro system that comes in Scala 3, described in 5.4 essentially gains inspiration from these technologies and completes what we present in this work.…”
Section: Related Workmentioning
confidence: 79%
See 2 more Smart Citations
“…The aforementioned syntactic mondalities are introduced to denote where the evaluation needs to be deferred and we already cross the boundary of semantics-preserving code. At this point, we can navigate and guide freely the process of generating code from a quoted domain-speci c language as shown in past work [6,10,13]. The macro system that comes in Scala 3, described in 5.4 essentially gains inspiration from these technologies and completes what we present in this work.…”
Section: Related Workmentioning
confidence: 79%
“…From this artifact, it is relatively simple to extract the original AST of the method. Quoted code fragments are also encoded [13] in TASTy.…”
Section: Methodsmentioning
confidence: 99%
See 1 more Smart Citation
“…Although our work is inspired by Haskell, there is reason to believe that it has wider applications. The recent release of Scala 3 added support for typed code quotations to the language [Stucki et al 2018]. Preliminary experiments suggest that these quotations suffer from surprising interactions with implicit arguments: implicit resolution within quotations sometimes fails mysteriously.…”
Section: Discussionmentioning
confidence: 99%
“…Since its introduction Sheard 1997, 2000] multi-stage programming with quotation has attracted both theoretical and practical interest. Several languages, including MetaOCaml [Kiselyov 2014], Haskell and Scala [Stucki et al 2018], include implementations of typed quotations.…”
Section: Related Workmentioning
confidence: 99%