develooper Front page | perl.perl5.porters | Postings from July 2001

RE: [ID 20010703.002] [5.6.2-to-be] PerlIO is EVIL

Thread Previous | Thread Next
From:
vkonovalov
Date:
July 6, 2001 08:21
Subject:
RE: [ID 20010703.002] [5.6.2-to-be] PerlIO is EVIL
Message ID:
E3FB32585BF1D411B9E900805FF51A0808C434@RU0022EXCH001U
> > > >Additionally, there are several places where local temporary 
> > > variables assigned just to make further assignment less verbose. 
> > > >("buf" in PerlIOStdio_read function is an example).
> 
> So?  What's wrong with being less verbose?  Clarity counts too,
> though obviously different authors have different views of
> clarity.
> 
> > Okay. 
> > Here is a tiny-optimization patch. Although patch is 
> obvious, I checked for perl to pass tests after applying it.
> 
> [ patch snipped ]
> 
> This is rather pointless since any decent optimizer ought to 
> do the same
> for you anyway.  I checked.  Both gcc and Sun's cc produced 
> identical code
> for the two versions.

agreed, and that's why I did not suggested that patch earlier. Precisely, I thought that compiler should optimize that stuff away, and that is why I did not included this (?:pseudo-)?optimization patch into my 11079 one.

> If you think the changed code is somehow "cleaner", that's 
> fine and not
> worth arguing about.

It is obvious that perlio.c is written in a different style that other perl itself, and one could argue whether this is good or bad.
I accept "cleaner" or not style as it is.

Best wishes,
Vadim V.Konovalov, Software developer
ZAO Lucent Technologies, St.Petersburg branch
e-mail:	vkonovalov@lucent.com
phone:	+7(812)3298522

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