Abstract
Scala is a powerful language that supports a variety of fea- tures, but it lacks virtual traits. Virtual traits are class- valued object attributes and can be redefined within sub- traits. They support higher-order hierarchies and family polymorphism. This work introduces virtual traits into Scala and explains how to encode virtual traits on top of existing Scala features. We have implemented this encoding using Scala annotation macros and have conducted two small case studies.
| Related KIT institution | Institute for Program Structures and Data Organisation (IPD) |
|---|---|
| Language | English |
| KITopen ID | 1000188552 |
| Keywords | Family polymorphism, Macros, Virtual classes, Virtual traits |
| Publisher | Association for Computing Machinery (ACM) |
| ISBN of the conference proceedings | 978-1-4503-2868-5 |
| Event | 14th European Conference on Object-Oriented Programming (ECOOP), Uppsala, Sweden, Jul 28 – 29, 2014 |
| Referenced in | Scopus Dimensions OpenAlex |