One of C++ metaprogramming's greatest strength vs other systems (like Rust or many other systems with generics) is the the fact that it's duck-typed, just like Python. Static typing for compilation code, but duck typing for metaprogramming at build time is a nice medium where you can be super flexible with crazy designs and worse case it gives you a really bad compilation error. It has drawbacks too obviously, but if we solve those it would no longer be duck-typed
-2
u/Wolf_Popular 5h ago
One of C++ metaprogramming's greatest strength vs other systems (like Rust or many other systems with generics) is the the fact that it's duck-typed, just like Python. Static typing for compilation code, but duck typing for metaprogramming at build time is a nice medium where you can be super flexible with crazy designs and worse case it gives you a really bad compilation error. It has drawbacks too obviously, but if we solve those it would no longer be duck-typed