|
|
|
|
|
by elfprince13
3798 days ago
|
|
I've been working on a similar project for a while ( https://github.com/elfprince13/RacketMacros4Cxx ), and I should also point out that while templates are Turing complete, that only means you can express arbitrary computations. It doesn't mean you can express arbitrary (hygienic) manipulations of syntax trees, which is more typically what you want to accomplish with metaprogramming Also, once you have Racket macros, you quickly discover you don't really need templates any more either. See section 4 of https://drive.google.com/open?id=0Byxgs15FUp2QRHJRVFVBLTZZc1... for some good examples rewriting code that Nvidia shows off as good examples of "how to optimize CUDA" to something that doesn't look like someone had an accident with copy/paste. |
|