Hacker News new | ask | show | jobs
by marshray 3010 days ago
Go on, tell me again about how C++ compile-time metaprogramming is so horrible ...
2 comments

Just because doing it in C is worse doesn't mean the way its done in C++ isn't bad.
> Just because doing it in C is worse doesn't mean the way its done in C++ isn't bad.

Maybe... I hesitate to call it "bad" unless there's a clearly better solution to the problem.

I believe this is C, since we're on the LKML, not C++.

Even if it's horrible, in a kernel you might want macros like these if a function call would sit in a hotpath and induce overhead.

I think the point of that comment was "because clearly people still want to do these things and are thereby doing even worse in C".