The use case is just to ease the generation of code. We could easily get away without any metaprogramming, but it is convenient + makes code maintenance simpler.
So in this case, it seems using a macro would be preferred
The use case is just to ease the generation of code. We could easily get away without any metaprogramming, but it is convenient + makes code maintenance simpler.
So in this case, it seems using a macro would be preferred