On Sunday, 2 September 2012 at 15:09:50 UTC, deadalnix wrote:
Le 02/09/2012 16:51, Jacob Carlborg a écrit :
I really don't like the name "handful". What would be the difference compared to a regular set container? To me it sounds like we should have
a standard set container in Phobos, std.container.set.


+1, and we are back to the allocator design.

+2 on the basis of typical "real world" (if I may says so) usage. It calls for a set container, both mutable and immutable.

For a "handful" of values (say 5 or less), I'm not even sure the O(1) method is faster than the O(n) one.

As for the intervals, I suppose one would have to define open intervals, because I think they would be much more useful than closed ones when the intervals are contiguous (in particular with floats/doubles). One must be able to translate x0 <= x < x1 in intervals else they are practically useless for anything else than integers and other discrete values.

Reply via email to