in reply to RFC: Should join subsume reduce?

FWIW, I'd submit a patch to add reduce as a built-in rather than conceptually overload join in what is potentially a confusing manner. If such a join existed, every time I saw it I would have to stop and think to myself, "oh, this is really a reduce with an odd name"

Besides, this would be working against the trend towards perl6. Things like the 2 versions of select are going away AFAIK rather than multiplying :-)

Replies are listed 'Best First'.
Re^2: RFC: Should join subsume reduce?
by Roy Johnson (Monsignor) on Feb 22, 2006 at 16:26 UTC
    Notwithstanding that the smart-match operator, the crowning jewel of Perl6, is going to do about 15 times as many things as it currently does in Perl5, Perl6's trends are not particularly relevant to Perl5 development. It is not the goal of Perl5 to have it gradually become Perl6.
    If such a join existed, every time I saw it I would have to stop and think to myself, "oh, this is really a reduce with an odd name"
    Do you really believe that you have no ability to assimilate idioms into your understanding? Do you still see a map and think "Oh, that's really a foreach with an odd name and an accumulator"?

    I have updated the original post to address the issue of reduce as a built-in, and some other issues that have been raised (including a way of understanding the proposed form of join).


    Caution: Contents may have been coded under pressure.