|
Boost : |
Subject: Re: [boost] Painting a bikeshed ...
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2015-10-02 11:00:20
On Fri, Oct 2, 2015 at 6:10 AM, alex <alexhighviz_at_[hidden]> wrote:
>>
>>If that were specified, then the mth_to_nth_element name has merit for
> Sean's
>>algorithm, but Marshall's is still left without a good name. Finding
> similar names
>>that vary only on the use of "sort" vs. "gather", for example, would be
> helpful.
>>
>
> One problem with both "gather" and "into" is that they suggest picking or
> inserting additional elements, whereas the algorithm just rearranges values.
> Rearranging to some criterion is sorting IMO.
> One problem with "into" is that it implies insertion, and therefore also
> picking up additional elements.
>
meh, I don't think that's a big issue. 'into' is just a clue, I don't
think it leads to MISunderstanding, just not full understanding.
however...
> I think the discussion so far underestimates how much information is in the
> argument names. If you have to provide a range and a subrange it is clear
> that the function is not just sorting the subrange.
>
> Some possible alternatives for mth_to_nth_element are:
> - stratum (as in stratification)
> - league
> - echelon
>
> An alternative for subrange could be segment:
>
> sort_to_league(range, segment); // Sean's function
> sort_to_unsorted_league( range, segment); // Marshall's function
>
> or
>
> sort_to_sorted_stratum(range, segment); // Sean's function
> sort_to_stratum (range, segment); // Marshall's function
>
> or
>
> sorted_stratify (range, segment) ; // Sean's function
> stratify (range, segment) ; // Marshall's function
>
I really like stratify.
I just mentioned this yesterday in another thread - at some point you
just need to co-opt a (hopefully related) term, and give it defined
meaning in programming.
I can see strata (and variations) becoming a term used in a number of places.
sorted_stratify() still doesn't seem quite right to me, however. Once
a person understands stratify, they then try to understand what a
_sorted_ stratify would be, and that leads to:
- wasn't stratify already sorting (in a course-grained way)
- does it sort all 3 strata (and then isn't that just sort()?)
midsort_stratify() ?
stratify_subsort() ?
:-( getting a bit wordy and confusing
Tony
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk