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. Student works
  4. Macro Annotations for Scala 3
 
master thesis

Macro Annotations for Scala 3

Ang, Zhendong
June 17, 2022

Macro annotations are an important feature in Scala 2 macro system. Many projects use macro annotations to implement their systems or libraries. Due to the unportability of Scala 2 macro system, Scala 3 redesigns the macro system to make it more reliable and portable. But macro annotations have not been implemented in Scala 3 yet, resulting in some inconvenience in migrating projects that use macro annotations to Scala 3. Following the core design of Scala 2 macro annotations, we introduce the macro annotations as transformations from definitions to definitions. In this thesis, we also list rules to keep our simplicity but not hurt its functionality at the same time. The main difference between macro annotations of Scala 2 and Scala 3 is that in Scala 2 macro annotations expand before typechecking, while they expand after typechecking in Scala 3. Our implementation is based on a breadth-first approach, which helps us implement a tail-recursive transformation. We write test cases covering common and even uncommon cases to test the correctness of our macro annotation system.

  • Files
  • Details
  • Metrics
Loading...
Thumbnail Image
Name

Master Thesis_Zhendong Ang.pdf

Type

N/a

Access type

openaccess

License Condition

copyright

Size

388.38 KB

Format

Adobe PDF

Checksum (MD5)

57749eb5cfa8c6853c54d21f7ac4c428

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