John Bray wrote:
>For purely stylistic reasons I'd use subroutines rather than functions for
>2 reasons:
>
>1) Its removes the possible confusion that copy is a variable. This is
>easily checked, but slows down code comprehension by others.
>
>2) It makes documentation generation using keyword spotting much easier.
>Its trivial for HTML converters to spot CALL(
>but much harder to spot the difference between functions and variables.
I do not recall seeing the original, and it's not worth going to the archives
for what I want to say.
John's item 2). I have an immediate knee-jerk reaction against. If this is a
contributor to John's not using function calls, to me this is bad. No matter
how useful it is to have an automatics parser write your documentation, I do not
believe that limitations of the parser should dictate one's style. Functions
and Subroutines are used in different ways -- there has been much discussion of
PURE Functions -- a PURE Subroutine must be an oxymoron.
I have never used automatic documentors (such a word?), but I would assume that
at some level intelligent human interface is required.
I can agree with standards and John's (derived by humans) that are available on
the net are worth considering (but not always agreed with), but no limitation of
a computer function -- not a pun -- is going to dictate my programming style.
Regards, Paddy
Paddy O'Brien,
Transmission Development,
TransGrid,
PO Box A1000, Sydney South,
NSW 2000, Australia
Tel: +61 2 9284-3063
Fax: +61 2 9284-3050
Email: [log in to unmask]
Either "\'" or "\s" (to escape the apostrophe) seems to work for most people,
but that little whizz-bang apostrophe gives me little spam.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|