the opendir() thing...

Fairlight fairlite at fairlite.com
Wed Apr 6 10:04:53 PDT 2005


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 rminded me about this new
> 5.0 functio... 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 recognise
what's going on with a nextdir() loop than they are to recognise a
system-maintained array and its vagaries.  Thus, you'll cut potential
future expenditures by utilising standard features rather than extensions.

>From a business standpoint, it makes more sense to follow the traditional
idiom, IMHO.

mark->
-- 
          *****   Fairlight Consulting's Software Solutions   *****
OneGate Universal CGI Gateway:                  http://onegate.fairlite.com/
FairPay PayPal Integration Kit:                 http://fairpay.fairlite.com/
RawQuery B2B HTTP[S] Client & CGI Debugger:     http://rawquery.fairlite.com/
Lightmail Mail Sending Agent:                   http://lightmail.fairlite.com/


More information about the Filepro-list mailing list