
From: David Abrahams <dave@boost-consulting.com>
"Jeff Garland" <jeff@crystalclearsoftware.com> writes:
On Wed, 14 Apr 2004 13:04:34 +0100, Val Samko wrote
Does that mean that add_month won't be implemented? What if we call it inc_month, instead of add_month? inc_month (Increase Month) in no way assumes that the day of the month will stay the same, it will just increase the month.
Yes, perhaps a different name would help eliminate any confusion that we are doing 'math' here.
I think readability is more important. Nobody but pedants have problems with string + string. Likewise I think:
d + 2*months
or whatever is better than the functional-looking alternatives.
If there was universal acceptance of what it means to add two months to a date, I might agree. Given the imprecise notion of what it means to add two months, however, I disagree. "next_month" or "increment_month" versus "add_month" better distinguish the imprecision. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;