|
ABSTRACT
"Scrap Your Boilerplate" (SYB) is a well studied and widely used design pattern for generic traversal in the Haskell language, but almost unknown to generic programmers in C++. This paper shows that SYB can be implemented in C++. It identifies the features and idioms of C++ that correspond to the Haskell constructs that implement SYB, or can be used to emulate them, and provides a prototype C++ implementation.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
A. Alexandrescu. Modern C++ Design.C++ In-Depth Series. Addison-Wesley, 2001.
|
| |
2
|
|
| |
3
|
The Boost initiative for free peer-reviewed portable C++ source libraries. http://www.boost.org.
|
| |
4
|
|
| |
5
|
J. de Guzman and D. Marsden. Fusion library homepage. http://spirit.sourceforge.net/dl_more/fusion_v2/libs/fusion/doc/html.
|
| |
6
|
P. Dimov. Boost Bind library. http://www.boost.org/libs/bind/bind.html.
|
| |
7
|
U. W. Eisenecker, F. Blinn, and K. Czarnecki. A solution to the constructor-problem of mixin-based programming in C++.In1st Workshop on C++ Template Programming, Oct. 2000.
|
| |
8
|
|
| |
9
|
D. Gregor, J. Järvi, J. G. Siek, A. Lumsdaine, G. D. Reis, and B. Stroustrup. Concepts: First-class language support for generic programming. In Proc. 21st ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Oct. 2006.
|
| |
10
|
R. Hinze and A. Löh. "Scrap your boilerplate" revolutions. In T. Uustalu, editor, Proc. 8th International Conf. on the Mathematics of Program Construction (MPC), Lecture Notes in Computer Science. Springer-Verlag, 2006.
|
| |
11
|
R. Hinze, A. Löh, and B. C. d. S. Oliveira. "Scrap your boilerplate" reloaded. In P. Wadler and M. Hagiya, editors, Proc. 8th International Symposium on Functional and Logic Programming (FLOPS), pages 13--29, 2006.
|
| |
12
|
J. Järvi and G. Powell. Boost Tuple Library (BTL) homepage. http://www.boost.org/libs/tuple/doc/tuple_users_guide.html.
|
| |
13
|
|
| |
14
|
|
| |
15
|
|
 |
16
|
Ralf Lämmel , Simon Peyton Jones, Scrap more boilerplate: reflection, zips, and generalised casts, Proceedings of the ninth ACM SIGPLAN international conference on Functional programming, September 19-21, 2004, Snow Bird, UT, USA
|
 |
17
|
|
 |
18
|
|
| |
19
|
|
| |
20
|
N. Myers. A new and useful template technique: "Traits". C++ Report, 7(5):32--35, June 1995.
|
| |
21
|
E. Niebler. Segmented Fusion - a-ha! http://article.gmane.org/gmane.comp.parsers.spirit.devel/2765.
|
| |
22
|
P. Nogueira Iglesias. Polytypic Functional Programming and Data Abstraction. PhD thesis, School of Comp. Science and Information Technology, The University of Nottingham, UK, Jan. 2006.
|
| |
23
|
|
| |
24
|
S. Peyton Jones and J. Hughes. Haskell 98: A non-strict, purely functional language. Technical report, Feb. 1999. http://haskell.org/onlinereport.
|
| |
25
|
A. Priesnitz and S. Schupp. From generic invocations to generic implementations. In 6th Workshop on Parallel/High- performance Object-Oriented Scientific Computing (POOSC), July 2006. to appear.
|
 |
26
|
|
| |
27
|
|
| |
28
|
A. A. Stepanov and M. Lee. The Standard Template Library. Hewlett Packard Laboratories, Feb. 1995.
|
| |
29
|
Arie van Deursen , Joost Visser, Source model analysis using the JJTraveler visitor combinator framework, Software—Practice & Experience, v.34 n.14, p.1345-1379, November 2004
|
 |
30
|
Joost Visser, Visitor combination and traversal control, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.270-282, October 14-18, 2001, Tampa Bay, FL, USA
|
| |
31
|
E. Winch. Heterogeneous lists of named objects. In Second Workshop on C++ Template Programming, Oct. 2001.
|
CITED BY 2
|
|
Jean-Philippe Bernardy , Patrik Jansson , Marcin Zalewski , Sibylle Schupp , Andreas Priesnitz, A comparison of c++ concepts and haskell type classes, Proceedings of the ACM SIGPLAN workshop on Generic programming, September 20-20, 2008, Victoria, BC, Canada
|
|
|
|
|