SPUG: Old biased arguments against defined-or operator

DeRykus, Charles E charles.e.derykus at boeing.com
Wed Jul 18 08:26:10 PDT 2007

> As promised at the meeting, here're the arguments advanced against the

> defined-or operator (orignally proposed as ??, hookhook, now //) that 
> delayed it for so very long.

> Watch out for the strawmen; they come on thick and fast:

> http://www.perl.com/tchrist/defop/defconfaq.html
> http://www.perl.com/tchrist/defop/defprofaq.text

Interestingly, Larry's 'first' suggestion is now available in the core: 

   use List::Util qw/first/; 

   $var  = first { defined } $foo, $bar, $baz;

   : Larry has not spoken on this matter in about a year. Some quotes 
   : of his from back then are from 
   : http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=393749501&fmt=text 

   : I'd much rather see something on the grep/sort/map pattern: 

   :     first {defined} $foo, $bar, $baz 

   : That's much more readable to me, and doesn't lose the really
   : bit of information down at the end of a block that might be
   : long.

Charles DeRykus 

-----Original Message-----
From: Yitzchak Scott-Thoennes [mailto:sthoenna at efn.org] 
Sent: Tuesday, July 17, 2007 11:49 PM
To: spug-list at pm.org
Subject: SPUG: Old biased arguments against defined-or operator

Seattle Perl Users Group Mailing List  
     POST TO: spug-list at pm.org
SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
    MEETINGS: 3rd Tuesdays
    WEB PAGE: http://seattleperl.org/

More information about the spug-list mailing list