develooper Front page | perl.perl5.porters | Postings from June 2018

Re: [perl #132142] Bleadperl v5.27.3-34-gf6107ca24b breaksMLEHMANN/AnyEvent-HTTP-2.23.tar.gz

Thread Previous | Thread Next
Dave Mitchell
June 25, 2018 08:15
Re: [perl #132142] Bleadperl v5.27.3-34-gf6107ca24b breaksMLEHMANN/AnyEvent-HTTP-2.23.tar.gz
Message ID:
On Sun, Jun 24, 2018 at 11:34:30AM +0200, Andreas Koenig wrote:
> There is no doubt that your intentions back then and today are
> consistent. But a more complete view on the whole matter should have
> revealed by now that there are at least two ways to read and argue the
> story.
> I sincerely believe it cannot be too hard for an average bystander of
> good will to argue both ways.

The basic question question is whether a perl programmer could have a
reasonable belief that sort has a special-cased and supported feature, in
that the specific syntax

    @array1 = sort @array1

behaves differently than, e.g.

    @array2 = sort @array1;   @array1 = @array1

as regards things like strengthening weak references.

Since there is absolutely no mention of this in the documentation for
sort, there would be an extremely strong assumption of no.

There is an entry in perldelta talking about an 'in-place' optimisation,
with no mention of weak refs etc.

Finally there is the RT ticket, originally concerning a 'sort -u' feature
request, where at one point, Tels suggested, in the context of *saving
memory*, that it would be nice to have a in-place sort feature, for which
he proposed a distinct new syntax (which was not taken up). 

I really cannot see how any of this justifies not strengthening weak refs
as being anything but a bug.

"Procrastination grows to fill the available time"
    -- Mitchell's corollary to Parkinson's Law

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About