Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-04-14 11:17:50

From: David Abrahams <dave_at_[hidden]>
> "Jeff Garland" <jeff_at_[hidden]> 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_at_[hidden]
Software Engineer           
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at, gregod at, cpdaniel at, john at