Y
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
_delirium
4385 days ago
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.
link
dalke
4386 days ago
Yes, exactly that.
link