develooper Front page | perl.perl5.porters | Postings from March 2016

Re: [perl #127684] operators '|||' and '&&&'

Thread Previous | Thread Next
From:
Abigail
Date:
March 14, 2016 14:46
Subject:
Re: [perl #127684] operators '|||' and '&&&'
Message ID:
20160314144711.GB5773@almanda.fritz.box
On Thu, Mar 10, 2016 at 04:10:02AM -0800, Ulrich Windl wrote:
> # New Ticket Created by  "Ulrich Windl" 
> # Please include the string:  [perl #127684]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org/Ticket/Display.html?id=127684 >
> 
> 
> Hi!
> 
> While writing a program for perl-5.10, I wondered whether the is an AND-equivalent for '//' for a closure like
> sub {
>         my $hi = $header_i{(shift)}  ??? return $hi;
>         die;
>     };
> 
> Where '???' is the operator that doesn't exist.
> Thus I wondered why the perl gurus didn't choose '|||' instead of '//'; then '&&&' would be just the natural thing for the AND-variant.
> Did I overlook something that would have prevented use of those operators?



Perl has wasted years [1] of bike-shedding over the spelling of the defined-or
operator [2], before actually implementing it -- let's not redo that.


[1]  '|||' was floating around on IRC at least as early as 1997. '//' came
     to live in 5.10, which was released near the end of 2007.
[2]  I think the name was settled by Larry invoking rule 1, but I may be
     mistaken.


Abigail

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