Hacker News new | ask | show | jobs
by thomasahle 4386 days ago
Can anyone explain the advantage of macros like this, rather than just using an `inline function`?

Is it because C doesn't have generics?

2 comments

In older C, people tended to be unwilling to trust the compiler's ability to inline functions, so there was a lot of use of macros to avoid small repeated function calls.
Yes, exactly that.