by stephc_int13 · 5y ago · 0 comments
Meta-programming can be super powerful and practical, and the current trend of reusing the language itself is clearly better than previous attempt.
But meta-programming in itself is not a novel idea, C macros and C++ templates are past well studied examples, and both produced awful results.
I am not sure they can prevent a new cycle of this nightmare.
I have no doubt about how powerful metaprogramming is, but it makes me feel that understanding and contributing to libraries that use it is out of my reach.
I have found that when any project gets to a certain size, it's almost inevitable that metaprogramming will be required, unless you want to make everything super dynamic and sacrifice performance. The idea of being able to do metaprogramming in the language I used to write the program itself is an interesting one.
What's wrong with templates ? They give you a compile-time functional language that operates on types, isn't that great ?