
12 Oct
2011
12 Oct
'11
11:08 p.m.
1) push_back() & unchecked_push_back() or 2) push_back() & checked_push_back().
If it was between 1 and 2, I would still find option (1) to be the best, because it keeps things closer to std::vector. However, one alternative would be to choose another name for the unchecked version. Its not like vec.at() or vec[N] really say much about how they check things. Even so, the lack of naming expressiveness in one function hardly justifies keeping others cryptic. Nonetheless, perhaps there are other options that work: 3) push_back() & put_back() 4) push_back() & set_back() I like option 3 much better than 4, since set is already so heavily used, and better than 2 for the reasons above. I'm undecided between 1 and 3. Cheers! Andrew Hundt