The video of my talk, Haskell and C++ Template Metaprogramming, is now available; and so are the slides. I pretty much covered the material from my last blog post, but many people (including me) find a video presentation easier to follow.
This is also a plug for the Northwest C++ Users Group that meets in Redmond every third Wednesday of the month. If you live in Seattle or on the east side of Lake Washington, check it out. You won’t be disappointed.
November 21, 2009 at 2:44 am
Dealing with C++ template metaprograms as purely functional programs seems to be a really powerful technique. However, if template metaprograms are functional programs, why not expressing them with the proper way: using an existing functional programming language.
There is research going on in Eötvös Loránd University, Budapest, Hungary, to reveal the connection between functional programming and C++ template metaprogramming. The final goal of the project is to write template metaprograms in some functional programming language, like Haskell, embedded into a C++ program, and automatically translate it to native C++ code.
Myself, as a P.h.D. student took part in building a tool for transforming a simple functional language, based on lambda expressions to C++ template metaprograms. Even such a simple tool largely simplified the development of C++ template metaprograms. You can read more about it in http://www.inf.elte.hu/english/conf/tfp_cefp_2009/Documents/TFP_programme.pdf.
Clean is a pure functional programming language. A Clean to C++ template metaprogram converter has been built. You can write purely functional code in a simplified version of the Clean language and the tool can convert them into template metaprograms.
Both of these tools build metaprograms with reasonable evaluation time, not only it does not require days to compile them with g++, but the code generated by the Clean based tool has excellent speed.
At the moment a tool for transforming Haskell code to C++ template metaprograms is under development there.
June 11, 2010 at 11:33 am
thank’s for info haskell..
November 11, 2010 at 12:58 pm
Brilliant lecture! Thanks alot, Bart!