HP3000-L Archives

October 1999, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Glenn Cole <[log in to unmask]>
Reply To:
Date:
Tue, 5 Oct 1999 15:59:38 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Stan writes after Ernest:

>>     HPGETPROCPLABEL( procname
>>                     ,plabel
>>                     ,status
>>                     ,f_lib
>>                    );

> I STRONGLY prefer seeing the commas *AFTER* the parameter, not
> before.  Why?
>
>    Greatly increased readability and maintainability, and
>    it matches with the English language usage.

Far be it from me either to disagree with Stan, or to instigate a
"programming style" war, but...

I haven't found the "greatly increased...maintainability" claim above to be
true in my own experience.  In fact, it was my desire to *improve*
maintainability which inspired me to switch several years ago to the style
shown above.

I got burned on more than one occasion by adding an additional parm at the
end, but forgetting to add the trailing comma to the preceding parm.  The
style above avoids that problem.  (I've heard that C doesn't mind having
a comma after the final parm, but that just doesn't "feel" right, so I
haven't tried.)

In my own code, it's much more common to add a parm to the end than
to delete the first parm; the "comma-before" style supports the former
well, while the "comma-after" style supports the latter.


Again, this is intended only as counterpoint, not as "flame bait."

--Glenn

ATOM RSS1 RSS2