Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2005-08-31 12:45:15

From: David Abrahams <dave_at_[hidden]>
> Rob Stewart <stewart_at_[hidden]> writes:
> > From: David Abrahams <dave_at_[hidden]>
> >> Aleksey Gurtovoy <agurtovoy_at_[hidden]> writes:
> >> >
> >> > I'd go with 'key_count' for the latter, but otherwise I agree with the
> >> > analysis.
> >>
> >> "count_key" sounds more natural to me, FWIW.
> >
> > I'd say it isn't a matter of whether it sounds "natural" but that
> > this is an algorithm and should be described by a verb or verbal
> > phrase.
> That's a little less clear in a pure functional system.

Well, if you don't think that's a good basis for choosing the
name, then "key_count" sounds like the number of keys, and
"count_key" sounds like a command, so the former seems more
appropriate. That is, the computation results in a value and
that value's name is "key_count." IOW, which sounds "natural"
really depends upon how you view the expression. If it is an
action/command/algorithm, then "count_key" is more appropriate.
If it is a result, then "key_count" is more appropriate.

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