Topic: The dissertation on metaprogramming in the Rock
All greetings! Couple of days ago I defended the dissertation on my research of techniques of metaprogramming for programming language Scala. Results of research were embodied in library scala.reflect, being part of standard delivery of language since 2012, and also in the new project scala.meta which is developed to replace scala.reflect in the future versions of language. On the basis of these libraries the system of macroes has been created, whose design also is described in the dissertation. Here the link to the final version of the text allocated on the server of our university: (the link is meanwhile removed, as in it hyperlinks are broken; meanwhile, please, use a preprint: https://t.co/affhjap6ef). The first page in French because is a University official language, but the text in English. The dissertation abstract is more low resulted. Metaprogramming is a technique that consists in writing programs that treat other programs as data. This paradigm of software development contributes to a multitude of approaches that improve programmer productivity, including code generation, program analysis and domain-specific languages. Many programming languages and runtime systems provide support for metaprogramming. Programming platforms often distinguish the notions of compile-time and runtime metaprogramming, depending on the phase of the program lifecycle when metaprograms execute. It is common for different lifecycle phases to be hosted in different environments, so it is also common for different kinds of metaprogramming to provide different capabilities to metaprogrammers. In this dissertation, we present an exploration of the idea of unifying compile-time and runtime metaprogramming in Scala. We focus on the practical aspect of the exploration; most of the described designs are available as popular software products, and some of them have become part of the standard distribution of Scala. First, guided by the motivation to consolidate disparate metaprogramming techniques available in earlier versions of Scala, we introduce scala.reflect, a unified metaprogramming framework that uses a language model derived from the Scala compiler to run metaprograms both at compile time and at runtime. Secondly, armed by the newfound metaprogramming powers, we describe Scala macros, a language-integrated compile-time metaprogramming facility based on scala.reflect. Thanks to the comprehensive nature of scala.reflect, macros are able to work with both syntactic and semantic information about Scala programs, enabling a wide range of previously impractical or impossible use cases. Finally, based on our experience and user feedback, we identify key strengths and weaknesses of scala.reflect and macros. We propose scala.meta, a new unified METAPRO - gramming framework, and inline/meta, a new macro system based on scala.meta, that take the best from their predecessors and address the most important problems.