Notions of computation and monads
Information and Computation
A natural semantics for lazy evaluation
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Generic programming and the STL: using and extending the C++ Standard Template Library
Generic programming and the STL: using and extending the C++ Standard Template Library
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series)
Concepts: linguistic support for generic programming in C++
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
A comparison of c++ concepts and haskell type classes
Proceedings of the ACM SIGPLAN workshop on Generic programming
Toward foundations for type-reflective metaprogramming
GPCE '09 Proceedings of the eighth international conference on Generative programming and component engineering
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Incremental type-checking for type-reflective metaprograms
GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
Functional Extensions to the Boost Metaprogram Library
Electronic Notes in Theoretical Computer Science (ENTCS)
Nested Lambda Expressions with Let Expressions in C++ Template Metaprograms
Electronic Notes in Theoretical Computer Science (ENTCS)
Proceedings of the Twelfth Workshop on Language Descriptions, Tools, and Applications
Hi-index | 0.00 |
Template and Preprocessor Metaprogramming are both well-known in the C++ community to have much in common with Functional Programming (FP). Recently, very few research threads on underpinning these commonalities have emerged to empower cross-development of C++ Metaprogramming (C++MP) and FP. In this paper, we program a self-contained real-world example in a side-by-side fashion to explore the usefulness of a few mainstream FP languages for this purpose: We develop a compile-time abstract datatype for Rational Numbers in C++. We then present the runtime equivalent in HASKELL, F#, and Scala to discuss some FP parallels across the languages. Here, we consider semi-automatic translation between C++MP and FP languages, for earlier studies on these parallels have already obviated the impracticability of fully automatic translations. Our study also shows the superiority of multiparadigm FP languages over single-paradigm ones. In particular, we conclude Scala to currently be the most promising FP language for facilitating C++MP.