Posted Jun 8, 2012 5:15 UTC (Fri) by quotemstr (subscriber, #45331)
Parent article: Generic red-black trees
And hacky macros are better than C++ templates or code generaton why, exactly? I'm all for using the C preprocessor, but there comes a time when enough is enough and the best option is metaprogramming.
Posted Jun 8, 2012 8:49 UTC (Fri) by przemoc (subscriber, #67594)
[Link]
> And hacky macros are better than C++ templates or code generaton why, exactly?
Who said they are? And it's irrelevant here.
> I'm all for using the C preprocessor, but there comes a time when enough is enough and the best option is metaprogramming.
These CPP macros actually allow some kind of poor metaprogramming. It goes without saying that C++ templates are quite powerful as turing complete system, but...
Check a bit old LKML FAQ, if you have forgotten about the context.