On Monday, 26 January 2015 at 20:58:36 UTC, Dicebot wrote:
Don't forget that there is already
http://dlang.org/phobos/std_algorithm.html#.group which matches
groupBy in this context (only groups consequitive elements). It
would be totally awkward to have those named differently (which
was why
As far as I know, the current groupBy docs explain quite
clearly what it
does. If you find it still inadequate or unclear, please file
bug against it so that we can look into improving the docs.
Read the docs now - they are perfect within the context of the
style of documentation (and these d
Thank you for the thoughtful reply.
I meant lost in terms of extra processing time and memory
consumption in order to achieve the fairly common use case of a
groupby pivot table or pandas style (ie what you get if you sort
the data by group and then run D groupby)
If you first sort the data,
Don't forget that there is already
http://dlang.org/phobos/std_algorithm.html#.group which matches
groupBy in this context (only groups consequitive elements). It
would be totally awkward to have those named differently (which
was why I have suggested to change the name from chunkBy to
groupBy
On 1/26/15 12:31 PM, H. S. Teoh via Digitalmars-d wrote:
As far as I know, the current groupBy docs explain quite clearly what it
does.
I agree. That said, perhaps a change of name would avoid confusion. I
like groupBy as we currently define it, it's straight within the spirit
of D. However,
On Mon, Jan 26, 2015 at 07:59:10PM +, Laeeth Isharc via Digitalmars-d wrote:
[...]
> My question is how much is lost by doing it in two steps (sort,
> groupby) rather than one.
[...]
I'm not sure I understand what you mean by "lost"... I assume you're not
talking about data loss, since that's
If "group by" in other languages refers to the latter function,
then
that means "groupBy" is poorly-named and we need to come up
with a
better name for it. Changing it to return tuples and what-not
seems to
be beating around the bush to me.
T
T: you are good with algorithms. In many ap