Loading...
Please wait, while we are loading the content...
Similar Documents
Good advice for type-directed programming aspect-oriented programming and extensible generic functions
| Content Provider | ACM Digital Library |
|---|---|
| Author | Washburn, Geoffrey Weirich, Stephanie |
| Abstract | Type-directed programming is an important idiom for software design. In type-directed programming the behavior of programs is guided by the type structure of data. It makes it possible to implement many sorts of operations, such as serialization,traversals, and queries,only once and without needing to continually revise their implementations as new data types are defined.Type-directed programming is the basis for recent research into "scrapping" tedious boilerplate code that arises in functional programming with algebraic data types. This research has primarily focused on writing type-directed functions that are closed to extension. However, Lämmel and Peyton Jones recently developed a technique for writing openly extensible type-directed functions in Haskell by making clever use of type classes. Unfortunately, this technique has a number of limitations such as the inability to write specialized cases for existential or nested data types and function types becoming too constrained to be used as first-class functions.We present an alternate approach to writing openly extensible type-directed functions by using the aspect-oriented programming features provided by the language AspectML. Our solution not only avoids the limitations present in Lämmel and Peyton Jones's technique, but also allows type-directed functions to be extended at any time with cases for types that were not even known at compiletime. This capability is critical to writing programs that make use of dynamic loading or runtime type generativity. |
| Starting Page | 33 |
| Ending Page | 44 |
| Page Count | 12 |
| File Format | |
| ISBN | 1595934928 |
| DOI | 10.1145/1159861.1159867 |
| Language | English |
| Publisher | Association for Computing Machinery (ACM) |
| Publisher Date | 2006-09-16 |
| Publisher Place | New York |
| Access Restriction | Subscribed |
| Subject Keyword | Open extension Expression problem Type-directed programming Type analysis Aspect-oriented programming Generic programming |
| Content Type | Text |
| Resource Type | Article |