develooper Front page | perl.fwp | Postings from July 2003

Re: my if?

From:
Bernie Cosell
Date:
July 2, 2003 03:37
Subject:
Re: my if?
Message ID:
3F027D30.4320.CC8A7C17@localhost
On 2 Jul 2003 at 8:07, Abigail wrote:

> On Tue, Jul 01, 2003 at 02:37:16PM -0400, Bernie Cosell wrote:
> > 
> > "Give you anything" isn't really the point -- Perl is filled with 
> > multiple ways to do things and the simple argument that you can do 
> > something similar using some other mechanism is rarely determinative.
> 
> I can't think of a single Perl construct that does only one thing, 
> and that can be done with about the same number of keystrokes
> by a more general construct.

Ah, and as a footnote to my previous note [mentioning 'our'] how about 
"unshift" ... and "unless"?  And all the statement modifiers [if/while/for]?

I happen to disagree that:
  {
      my $vbl ;
      sub xxx
      { ...

is particularly more elegant than having 'static', but since you don't, then I 
guess to your view you'd argue that:

   if (BOOL)
   {  stmt }

is also more 'elegant' than the statement modifier form:

  stmt if BOOL ;

in fact, as you pointed out for the closure-syntax, you could even have the 
'if' span multiple statements instead of just having it limited to a single 
statement.

  /Bernie\

-- 
Bernie Cosell                     Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com     Pearisburg, VA
    -->  Too many people, too few sheep  <--          




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