Opening book details…
Can I read Pattern-based traits on EtoBox?
Pattern-based traits by Weiyu Miao; Jeremy Siek is a scholarly article available to read on EtoBox.
What is Pattern-based traits about?
There have been exciting developments with respect to compiletime reflection for C# and Java. introduced what we call pattern-based reflection as a high-level notation for inspecting members of old classes and generating members of a new class. Huang and Smaragdakis [2008, 2011] further increased the expressiveness of pattern-based reflection and strengthened its type safety guarantees. However, these proposals took place in settings with just classes and/or mixins, which limit the ways that generated declarations can be composed (just linearly).In this paper we investigate the combination of pattern-based reflection with traits, which offer more expressive forms of composition. Further, we provide language features for manipulating sets of member declarations: giving them names, manipulating their domains using set operations, and passing them as arguments to traits. To demonstrate the expressiveness of the proposed language design, we implement a library for object-relational mapping. We also formalize the language design, defining the syntax and semantics for a language named PTFJ (for Pattern-based Traits in Featherweight Java)
- Author
- Weiyu Miao; Jeremy Siek
- Publisher
- ACM
- Published
- 2012
- Language
- EN