[Issue 13936] groupBy must be redone
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jan 11 05:38:08 PST 2015
https://issues.dlang.org/show_bug.cgi?id=13936
--- Comment #18 from Dicebot <public at dicebot.lv> ---
Some quick notes from a very quick look:
> I think we shouldn't care about non-equivalence relations
This is something I simply can't accept. groupBy is not a specialized linear
algebra thing - it is a quite common utility that will be widely used and
widely misused.
In fact the reason why non-equivalence implementation has become default in
second PR was exactly that some of first attempts of bearophile to experiment
with predicate quickly triggered the infinite empty range behavior. I don't
thing it is an acceptable for default implementation at all.
Some of proposed implementation ideas make lot of sense but I feel very strong
about two points:
1) non-equivalence relation support must be default groupBy behavior
2) more efficient versions should be enabled by CT argument as opposed to new
function name - it is very hard to invent short names that make sense here (it
can still forward to separate private implementation)
--
More information about the Digitalmars-d-bugs
mailing list