Static type checking of multi-methods
OOPSLA '91 Conference proceedings on Object-oriented programming systems, languages, and applications
Manifest types, modules, and separate compilation
POPL '94 Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A type-theoretic approach to higher-order modules with sharing
POPL '94 Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
ACM Transactions on Programming Languages and Systems (TOPLAS)
Theory and Practice of Object Systems - Special issue: type systems
Putting type annotations to work
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
POPL '01 Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns
Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns
Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
A lightweight implementation of generics and dynamics
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire
Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture
Merging Monads and Folds for Functional Programming
Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text
Polytypic Values Possess Polykinded Types
MPC '00 Proceedings of the 5th International Conference on Mathematics of Program Construction
A denotational semantics of inheritance
A denotational semantics of inheritance
Scrap your boilerplate with class: extensible generic functions
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
TypeCase: a design pattern for type-indexed functions
Proceedings of the 2005 ACM SIGPLAN workshop on Haskell
Scalable component abstractions
OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Open data types and open functions
Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programming
Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
RepLib: a library for derivable type classes
Proceedings of the 2006 ACM SIGPLAN workshop on Haskell
Design patterns as higher-order datatype-generic programs
Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
Modular generic programming with extensible superclasses
Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
An object-oriented approach to datatype-generic programming
Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
Journal of Functional Programming
Uniform boilerplate and list processing
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Applicative programming with effects
Journal of Functional Programming
Comparing libraries for generic programming in haskell
Proceedings of the first ACM SIGPLAN symposium on Haskell
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
Programming in Scala: A Comprehensive Step-by-step Guide
Programming in Scala: A Comprehensive Step-by-step Guide
Science of Computer Programming
The essence of the iterator pattern
Journal of Functional Programming
Parametric datatype-genericity
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
Alloy: fast generic transformations for Haskell
Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
Genoa Proceedings of the 23rd European Conference on ECOOP 2009 --- Object-Oriented Programming
A Type-theoretic Reconstruction of the Visitor Pattern
Electronic Notes in Theoretical Computer Science (ENTCS)
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Type classes as objects and implicits
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
“Scrap your boilerplate” reloaded
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
The implicit calculus: a new foundation for generic programming
Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation
Towards combinators for bidirectional model transformations in scala
SLE'11 Proceedings of the 4th international conference on Software Language Engineering
Hi-index | 0.00 |
Datatype-generic programming (DGP) involves parametrization of programs by the shape of data, in the form of type constructors such as ‘list of’. Most approaches to DGP are developed in pure functional programming languages such as Haskell. We argue that the functional object-oriented language Scala is in many ways a better choice. Not only does Scala provide equivalents of all the necessary functional programming features (such as parametric polymorphism, higher-order functions, higher-kinded type operations, and type-and constructor-classes), but it also provides the most useful features of object-oriented languages (such as subtyping, overriding, traditional single inheritance, and multiple inheritance in the form of traits). Common Haskell techniques for DGP can be conveniently replicated in Scala, whereas the extra expressivity provides some important additional benefits in terms of extensibility and reuse. We illustrate this by comparing two simple approaches in Haskell, pointing out their limitations and showing how equivalent approaches in Scala address some of these limitations. Finally, we present three case studies on how to implement in Scala real DGP approaches from the literature: Hinze's ‘Generics for the Masses’, Lämmel and Peyton Jones's ‘Scrap your Boilerplate with Class’, and Gibbons's ‘Origami Programming’.