Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming 2001
DOI: 10.1145/507635.507665
|View full text |Cite
|
Sign up to set email alerts
|

Extensible algebraic datatypes with defaults

Abstract: A major problem for writing extensible software arises when recursively defined datatypes and operations on these types have to be extended simultaneously without modifying existing code. This paper introduces Extensible Algebraic Datatypes with Defaults which promote a simple programming pattern to solve this well known problem. We show that it is possible to encode extensible algebraic datatypes in an object-oriented language, using a new design pattern for extensible visitors. Extensible algebraic datatypes… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
28
0

Year Published

2003
2003
2019
2019

Publication Types

Select...
4
3
2

Relationship

1
8

Authors

Journals

citations
Cited by 49 publications
(28 citation statements)
references
References 11 publications
0
28
0
Order By: Relevance
“…Another well-known challenge in programming language design is to simultaneously support both the easy addition of new types and the easy addition of new operations to an existing type hierarchy [Reynolds 1975;Cook 1991;Odersky and Wadler 1997;Krishnamurthi et al 1998;Findler and Flatt 1999;Garrigue 2000;Zenger and Odersky 2001]. For example, suppose we have a program with a collection of types representing various shapes-like Shape, Rectangle, and Triangle-and a collection of operations on these types, like area and intersect.…”
Section: The Binary Methods Problemmentioning
confidence: 99%
“…Another well-known challenge in programming language design is to simultaneously support both the easy addition of new types and the easy addition of new operations to an existing type hierarchy [Reynolds 1975;Cook 1991;Odersky and Wadler 1997;Krishnamurthi et al 1998;Findler and Flatt 1999;Garrigue 2000;Zenger and Odersky 2001]. For example, suppose we have a program with a collection of types representing various shapes-like Shape, Rectangle, and Triangle-and a collection of operations on these types, like area and intersect.…”
Section: The Binary Methods Problemmentioning
confidence: 99%
“…JaCo JaCo is an extensible compiler for Java 1.4 written in a slightly extended Java dialect called Keris that supports extensible algebraic data types with defaults [jac07b,ZO01a]. Keris is itself implemented as a modular language extension to JaCo.…”
Section: Compilers Overviewmentioning
confidence: 99%
“…The first implementation of JaCo was done in a Java dialect supporting algebraic types with defaults [ZO01a]. A set of object-oriented architectural patterns was used to further support extensibility.…”
Section: Related Workmentioning
confidence: 99%
“…to add a new method to existing classes) in object-oriented programming languages, and the "visitor pattern" [4] is invented for this very purpose. The fact that it is difficult to add both new data constructors and new operations without modifying existing code is called the expression problem (aka the extensibility problem) and has been extensively studied (e.g., [3,32,22]). The problem, though symmetrical, seems to have severer impact on polymorphic variant calculi than on polymorphic record calculi, simply because functions are harder to define than constructors.…”
Section: A Problem Of Polymorphic Variant Calculimentioning
confidence: 99%