One of the perenial issues in modern computer science is the naming of what are called “accessor” methods. You have a class and it has some POD1 members. Because we are all so functional and encapsulated these days, you are never so gauche as to let other bits of code (“clients”) touch the data directly. Instead clients must call methods on the class in order to access (hence, “accessor”) the data2.
The big issue is, then, what names do you use for those accessor methods? There are two primary schools.
One is the “long name” school, where you have different names for reading and writing. E.g.
get_option to retrieve the current value and
set_value to write a new value.
The other school is the “overload” school where you use the same name (e.g.
option) but distinguish the methods by the number of arguments. That is, you pass nothing to the read method and the new value to the write method.
I personally have, in the past, favored the “overload” style because I find it more succinct and elegant, but have been gradually drifting toward the “long name” style for C++ because of the rise of a more functional (that is, Lispy) style3. The problem with the overload style is passing off references to the method. In the overload style you have to do a clunky
static_cast to get the right one, but if you use long names it just works.
No real point here, I just thought you all had been exposed to enough geek speak here lately.
1 Yes, this is an Official Term that is used in technical papers. It was invented to distinguish between data objects that are just pure, passive data and data objects that have functionality attached. Modern compilers are clever enough that they can do a lot of optimizations with POD that is not valid with non-POD.
2 Yes, it’s a bother, but it does pay off in the long run for large software projects and these days, just about everything ends up as a large software project. I would explain how it pays off but I don’t want to get sued by your survivors when it glazes your eyes over permanently. Honestly, most people in the industry don’t really understand why, they just do it because it’s the fashion.