develooper Front page | perl.perl5.porters | Postings from April 2011

Re: PATCH: perlop booboo

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
April 26, 2011 09:19
Subject:
Re: PATCH: perlop booboo
Message ID:
14087.1303834772@chthon
>Sorry I left out the Cc in my first reaction. Back to the list ...

>On Tue, 26 Apr 2011 10:05:34 -0600, Tom Christiansen <tchrist@perl.com>
>wrote:

>> >On Tue, 26 Apr 2011 09:05:17 -0600, Tom Christiansen <tchrist@perl.com>
>> >wrote:
>> 
>> >>> Thanks, applied with a twist.
>> >> I> used paren-less open and or instead of ||
>> >> 
>> >> That's precisely what I *didn't* want to see.
>> 
>> > And precisely why not?
>> 
>> Because I find it both hard to read and error-prone.

> I applied it that way because it is more modern perl

Modern Perl?  Please, please tell me you are pulling my leg.

If it is not, this is just nannying.  There is nothing wrong
with using parentheses for clarity, and there is nothing
wrong with using "||" so that it stands out better.

To claim that it is somehow more "modern" -- whatever *that* 
really means -- to *not* do that in Perl is not a claim I 
can support, nor even take seriously.

> Easier to read is in the eye of the beholder. Personally ...

I refuse to argue matters of style when matters of substance
are left undone.

    % grep -l weak {perl5*,blead}/cpan/List-Util/lib/Scalar/Util.pm
    perl5.011.000/cpan/List-Util/lib/Scalar/Util.pm
    perl5.011.001/cpan/List-Util/lib/Scalar/Util.pm
    perl5.011.002/cpan/List-Util/lib/Scalar/Util.pm
    perl5.011.003/cpan/List-Util/lib/Scalar/Util.pm
    perl5.011.004/cpan/List-Util/lib/Scalar/Util.pm
    perl5.011.005/cpan/List-Util/lib/Scalar/Util.pm
    perl5.012.000/cpan/List-Util/lib/Scalar/Util.pm
    perl5.012.001/cpan/List-Util/lib/Scalar/Util.pm
    perl5.012.002/cpan/List-Util/lib/Scalar/Util.pm
    perl5.012.003/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.000/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.001/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.002/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.003/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.004/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.005/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.006/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.007/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.008/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.009/cpan/List-Util/lib/Scalar/Util.pm
    perl5.013.010/cpan/List-Util/lib/Scalar/Util.pm
    blead/cpan/List-Util/lib/Scalar/Util.pm

Looks like Perl first became able to handle weak references
from the Perl level, not just the C level, in 5.11.  Since
that came in via a cpan module, I can understand how this might
have been missed.

Right now I'm trying to figure out what to say about it, and
where.  Is there any argument that it should *not* be documented
in perlref -- at least?

--tom

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