nealabq
Joined 14 years ago
Karma
2,562
Submissions
654
Member since
Aug 2
let me think about it
View on Hacker NewsJoined 14 years ago
I am reminded of Lord Peter Wimsey.
But your meaning is clear. In an assert expression, don't call functions that might change the program/database state. Be as "const" as possible.
htons(..) and related socket-utility names are also often macros, but I'm pretty sure there is not a std::htons(..) in the C++ standard, partly because 'htons' is not an attractive name. Since it's (sometimes) a macro don't qualify its namespace like ::htons(..).
A long time ago in the Microsoft C (and later C++) dev envs there were macros named "min" and "max", which I thought were terrible names for macros.
Riposte: I knew you'd say that! Snap!