[bitc-dev] Template metaprogramming vs. type classes
Jonathan S. Shapiro
shap at eros-os.com
Mon Aug 18 14:28:16 CDT 2008
I just hit a case where I needed to make use of C++ template
metaprogramming. I have to say, template metaprogramming is a truly ugly
thing, but it is well motivated.
TMP seems to come up in two cases:
1. Where you have a quasi-type like enum that you need to work around
in some way. This was my case today, and it doesn't seem likely to
arise in BitC.
2. Where you truly have a useful specialization.
I'm not sure how many of these cases will actually arise in BitC. Can
anyone come up with a really credible and useful example?
The main ones that I can think of have to do with limiting expansion in
the polyinstantiator. I can also come up with some useful cases for
More information about the bitc-dev