
From: David Abrahams <dave@boost-consulting.com>
Rob Stewart <stewart@sig.com> writes:
From: David Abrahams <dave@boost-consulting.com>
Aleksey Gurtovoy <agurtovoy@meta-comm.com> 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@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;