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
From:
Dave Mitchell
Date:
June 25, 2018 08:15
Subject:
Re: [perl #132142] Bleadperl v5.27.3-34-gf6107ca24b breaksMLEHMANN/AnyEvent-HTTP-2.23.tar.gz
Message ID:
14545_1529914501_5B30A480_14545_69_1_20180625081445.GP2753@iabyn.com
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About