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

Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
April 4, 2010 07:26
Subject:
Re: RFC: Perl manual pages -- update to follow the perlstyle.pod guidelines
Message ID:
14024.1270391183@chthon
>On Sun, Apr 04, 2010 at 07:50:41AM -0600, Tom Christiansen wrote:
>> I simply reject their premise that or is ipso facto superior to
>> || and I don't want to see that position promulgated as the gospel it <SNIP>

>In the case of open(), I would argue that "or" is superior to "||" because it
>works whether there are parens or not.

>  open(my $fh, "<", "foo.txt") or die $!;
>  open my $fh, "<", "foo.txt" or die $!;

>Isn't this exactly the sort of situation that low-precedence "or" was designed
>for?

Sigh. 

Yes, it is.

That isn't my point.  

I don't read function calls without a ) as having their arguments terminated.
The ) || works much, much, much better for me.

I always use ||.  Always.  And I do *not* make precedence errors, because
even if I forgot them, I also always use ).

--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