Abstract | ||
---|---|---|
Reuse of and abstraction over object initialization logic is not properly supported in mainstream object-oriented languages. This may result in significant amount of boilerplate code and proliferation of constructors in subclasses. It also makes it impossible for mixins to extend the initialization interface of classes they are applied to. We propose template constructors, which employ template parameters and pattern matching of them against signatures of superclass constructors to enable a one-to-many binding of super-calls. We demonstrate how template constructors solve the aforementioned problems. We present a formalization of the concept, a Java-based implementation, and use cases which exercise its strengths. |
Year | DOI | Venue |
---|---|---|
2013 | 10.1145/2637365.2517212 | Special Interest Group on Programming Languages |
Keywords | Field | DocType |
constructors,mixins,object initialization,reusability | Use case,Programming language,Superclass,Computer science,Reuse,Boilerplate code,Theoretical computer science,Initialization,Java,Pattern matching,Reusability | Conference |
Volume | Issue | ISSN |
49 | 3 | 0362-1340 |
Citations | PageRank | References |
0 | 0.34 | 7 |
Authors | ||
3 |
Name | Order | Citations | PageRank |
---|---|---|---|
Marko Martin | 1 | 1 | 0.70 |
Mira Mezini | 2 | 3171 | 211.04 |
Sebastian Erdweg | 3 | 461 | 33.21 |