Set ops in std.algorithm

Michel Fortin michel.fortin at michelf.com
Sat Mar 13 11:42:31 PST 2010


On 2010-03-13 12:02:40 -0500, Andrei Alexandrescu 
<SeeWebsiteForEmail at erdani.org> said:

> On 03/10/2010 05:47 PM, bearophile wrote:
>> This post is mostly for Andrei, but I don't think private emails are
>> good for this. I suggest to move the set-related functions of
>> std.algorithm to a different module, because:
>> 
>> 1) They are tied to a specific representation of sets (sorted unique
>> InputRanges), so if I have a BitSet, HashSet, ApproximateBloomSet,
>> etc, they don't work (they can work with a SearchTreeSet).
>> 
>> 2) I think there are too many names/functions in std.algorithm, and
>> their purpose is a bit too much mixed (and currently algorithm.d
>> module is 173 kB).
>> 
>> I don't know what can be a good name for such new module,
>> sorted_input_range_set is (I think) descriptive, but a bit too much
>> long :-)
>> 
>> Bye, bearophile
> 
> That's a good idea, particularly in wake of the fact that std.algorithm 
> has grown quite large.

I think a good module name would be std.sort. You can put the sort 
function as well as functions related to sorted ranges in it.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list