Boost logo

Boost :

Subject: Re: [boost] [gsoc 2013] draft proposal for chrono::date
From: Anurag Kalia (anurag.kalia_at_[hidden])
Date: 2013-05-04 13:09:29


> Correct, I was strongly leaning towards the former: intermediate types
> like year_and_month. And an open question is whether or not
> year_and_month would be a useful type to the client outside of this role.
> E.g. would it be useful to perform month arithmetic on a year_month
> object? Would it be helpful to get the number of days in a month out of a
> year_month object? Or is year_month simply an implementation detail that
> the client never sees?
>
> Personally I am still exploring these questions.

IMO they should be implementation. day_month is ambiguous so it shouldn't
have much use. I am confused about year_month though. It does have some
uses. But if we publicize it, it would be clear it has its main use in the
factory function. And then we would have to make day_month public too, which
I am strongly leaning against.

So overall, I would like to keep it hidden only. I don't think it has uses
enough to make it public. Moreover, its existence completely relies on our
factory function; nobody would have meant to include it in API had that
function not been in use. So, that gives us a hint too.

--
View this message in context: http://boost.2283326.n4.nabble.com/gsoc-2013-draft-proposal-for-chrono-date-tp4646142p4646636.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk