logoalt Hacker News

flohofwoeyesterday at 7:58 AM1 replyview on HN

I guess you're not a fan of 'const' either? ;)


Replies

eqvinoxyesterday at 12:52 PM

I am a fan of "const", because it is useful in expressing API constraints and behavior. Contrast against putting "register" on a function parameter being useless because either it's passed by value, then it's a copy anyway and register is meaningless to the caller, or it's a pointer, in which case it again does nothing because you already have a pointer (and something somewhere is very confused.)