Hacker News new | ask | show | jobs
by halayli 1118 days ago
So that they don't misuse it. A good example is vec.empty(). There's no point calling vec.empty() without checking its return value. It helps distinguish noun vs verb.
1 comments

This is really a mis-design; the proper name for the function should ask a question: `std::vector::is_empty()`.