Simon Cozens wrote:
> Right. You don't seem to be getting it, so I'm going to have to be harsh
here.
>
Are you sure? Is it possible that it's just that this isn't a side of
programming you've had need for or are familiar with yourself? TMTOWTDI, you
know, even if you're way is the best way.

> You see, there's a way we can canonically verify whether these suggestions
> have any merit whatsoever, or whether they should be shot down in flames
and
> burnt.
>
> Perl, being the practical language that it is, and since we can easily
> implement reduce and friends in Perl, we can very easily tell if there's a
> real need for these features by looking at whether anyone has attempted to
> implement them.
>
> So, if you can point me at a CPAN module that does this, I'll concede that
> *one* person actually cares enough about these things to do something
about
> it.
>
Please concede then:
- PDL (see pdl.perl.org). This implements reductions with great care,
defining new data types that can be effectively used with array semantics
- List::Util
(http://search.cpan.org/doc/GBARR/Scalar-List-Utils-1.02/lib/List/Util.pm)
is the pure perl version. It includes: first sum min max minstr maxstr
reduce

> Of course, one person caring doesn't mean that the need is strong enough
for
> something to go in Perl. There are all sorts of wacky modules out there,
not
> all of which should go in core. If you'd suggested adding support for URI
> encoding and decoding, I would have laughed a lot less, since that's a
feature
> that a lot of people need, want and use.
>
> But what is being proposed is completely and utterly unwanted by the vast
> majority of Perl users out there. It's pie-in-the-sky ludicrosity from
some
> ivory tower. It may be your hobby-horse, but there *is* no CPAN module to
> attempt to implement these things, there are no users, nobody wants it,
nobody
> needs it and nobody cares. End of story.
>
Well you're short by at least 1. I use reduce, I want reduce, I need reduce,
and I care about reduce. I also communicate regularly with a large numerical
programming community who does the same. Almost none of them use perl,
because at this stage it's just not good enough in this area. PDL is getting
there, but if it doesn't supply the function you need, you have to write it
in C and jump through all kinds of hoops do implement the optimisations that
perl could do if it knew about this stuff, but doesn't.

> So can we please leave these ridiculous delusions behind and get on with
some
> real work?
>
I guess my work is different to your work.

But that's the point, isn't it? We have different needs. I feel that your
RFC misses the inclusive nature of perl. I want to be able to write:
$a = sum(@b*@c+@d)
and have it DWIM. Even if @b,@c, and @d are columns of sparse tensors. If
you don't want this, fine. But don't stop me from having it.

Anyway, it so happens I started writing a counter-RFC on the plane on the
way home tonight. This discussion certainly makes me want to make sure I
finish it. It's called 'Perl should be Perl, only better'.


Reply via email to