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

Re: my if?

Thread Previous | Thread Next
From:
Abigail
Date:
July 2, 2003 02:51
Subject:
Re: my if?
Message ID:
20030702095110.GA8868@abigail.nl
On Wed, Jul 02, 2003 at 10:33:01AM +0100, Pense, Joachim wrote:
> 
> Abigail wrote
> > 
> > 
> > On Wed, Jul 02, 2003 at 07:58:03AM +0100, Pense, Joachim wrote:
> 
> > > that is often recommended in the Perl community. I think it 
> > is easy to see
> > > which version looks elegant and which one kludgy:
> > > 
> > > (Quoted from earlier in the thread, reformatted:)
> > > 
> > > |   sub x {
> > > |       static $vbl ;
> > > |       ...
> > > |
> > > 
> > > | {
> > > |     my $vbl;
> > > |     sub x {
> > > |     ...
> > > |     }
> > > | }
> > 
> > 
> > IMO, not doubt the latter looks far more elegant - as that 
> > enables your
> > 'static' variable to be shared with more than one function. Something
> > you can't do with a 'static' declared variable inside a function.
> > 
> 
> Mighty != elegant.
> 

And neither is not being flexible.


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