Repository logo

Infoscience

  • English
  • French
Log In
Logo EPFL, École polytechnique fédérale de Lausanne

Infoscience

  • English
  • French
Log In
  1. Home
  2. Academic and Research Output
  3. EPFL thesis
  4. Scalable Metaprogramming in Scala 3
 
doctoral thesis

Scalable Metaprogramming in Scala 3

Stucki, Nicolas Alexander  
2023

A metaprogrammer should be able to reason about the semantics of the generated code. Multi-stage programming introduced an elegant and powerful solution to this problem. It follows a semantically driven approach to code generation, where semantics are fully defined by the metaprogram and cannot accidentally change when we generate the code. This implies that the generated code is well typed and hygienic by construction. We can apply this principled semantic approach to other metaprogramming abstractions. However, different metaprogramming abstractions have different levels of expressiveness. Usually, the more expressive abstractions are more complex and give fewer static guarantees. It is hard or impossible to find a single abstraction that is both simple and fully expressive. Instead of choosing a single abstraction, we can design a single system out of several abstractions that scale with respect to expressiveness and complexity. We must be careful with the most expressive metaprogramming abstractions, as they may expose parts of the compiler or of its code representations, which hinders portability. We demonstrate that it is possible to design, implement and use in production a Portable Scalable Semantically Driven Metaprogramming System.

  • Files
  • Details
  • Metrics
Type
doctoral thesis
DOI
10.5075/epfl-thesis-8257
Author(s)
Stucki, Nicolas Alexander  
Advisors
Odersky, Martin  
Jury

Prof. Viktor Kuncak (président) ; Prof. Martin Odersky (directeur de thèse) ; Prof. Christoph Koch, Prof. Walid Taha, Dr. Ningning Xie (rapporteurs)

Date Issued

2023

Publisher

EPFL

Publisher place

Lausanne

Public defense year

2023-01-19

Thesis number

8257

Total of pages

227

Subjects

metaprogramming

•

macros

•

multi-stage programming

•

inlining

•

formalization

•

virtual algebraic data types

•

Scala

EPFL units
LAMP1  
Faculty
IC  
School
IINFCOM  
Doctoral School
EDIC  
Available on Infoscience
January 16, 2023
Use this identifier to reference this record
https://infoscience.epfl.ch/handle/20.500.14299/193908
Logo EPFL, École polytechnique fédérale de Lausanne
  • Contact
  • infoscience@epfl.ch

  • Follow us on Facebook
  • Follow us on Instagram
  • Follow us on LinkedIn
  • Follow us on X
  • Follow us on Youtube
AccessibilityLegal noticePrivacy policyCookie settingsEnd User AgreementGet helpFeedback

Infoscience is a service managed and provided by the Library and IT Services of EPFL. © EPFL, tous droits réservés