the opendir() thing...

Alan Mazuti amazu at trusteeservicesinc.com
Wed Apr 6 13:56:36 PDT 2005


Top Posted... By Design.

Commenting is always good except when John is trying publish it in Guru and
it takes up to many pages.  Using new commands  and learning new tricks is
always good.  Progression is good.  When you fail to progress you will
regress. :)

Alan Mazuti

-----Original Message-----
From: filepro-list-bounces at lists.celestial.com
[mailto:filepro-list-bounces at lists.celestial.com] On Behalf Of GCC
Consulting
Sent: Wednesday, April 06, 2005 12:05 PM
To: 'Fairlight'; 'filePro Mailing List'
Subject: RE: the opendir() thing...

 

> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com 
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf 
> Of Fairlight
> Sent: Wednesday, April 06, 2005 1:05 PM
> To: filePro Mailing List
> Subject: Re: the opendir() thing...
> 
> On Wed, Apr 06, 2005 at 12:39:40PM -0400, John Esak, the 
> prominent pundit,
> witicized:
> > 
> > Incidentally, it was Alan Mazutti who came into the room 
> one day last 
> > week with an opendir() application using @dirlist that reminded me 
> > about this new 5.0 function... Just in time for me to tell 
> Howie about it when he came in!
> > :-)  Might as well give credit to Alan for his contribution...  I'm 
> > still in the prehistoric days of using NEXTDIR() myself... :-)
> 
> I prefer nextdir() myself, mostly because it's a common idiom 
> across most languages (C, Perl, etc.).  The less non-standard 
> things you come to rely upon, the less confused you get when 
> switching between environments.  The more you use a 
> particular idiom in any supported language, the less likely 
> you are to forget the finer points of how it works, and thus 
> the less time you're likely to need a documentation refresher 
> before implementing it.
> 
> (Hey, after 7 years I was -still- forgetting the argument 
> order for open(2) in C, and I'd end up checking the manpage 
> almost every time--it happens.)
> 
> Additionally, if someone ever has to maintain your software 
> at some point in the future ("your" being "one's", -not- 
> "John's"), and they're not a hardcore filePro person but 
> rather someone coming into it from a general programming 
> background, they're far more likely to immediately recognize 
> what's going on with a nextdir() loop than they are to 
> recognize a system-maintained array and its vagaries.  Thus, 
> you'll cut potential future expenditures by utilizing 
> standard features rather than extensions.
> 
> >From a business standpoint, it makes more sense to follow the 
> >traditional
> idiom, IMHO.
> 
> mark->
All the more reason to comment what one is doing.  Not only for a future
programmer, but yourself when you return to the program a year or two later
and
try to remember why you did this.

Granted, comments increase the size of a processing table some, but with
today's
extremely large hard drive and fast computers, this size increase should
not, in
most cases, cause any problems.

Richard Kreiss
GCC Consulting 


_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list