Harry Putnam wrote:
> ... I'm having trouble seeing what is shorter or
> better about this.
> > : sub test_hdr_good {
I count 13 characters in test_hdr_good
header_is_good {
has 15 characters. For the price of two characters, you can
=> indicate the type of information [boolean] returned. If this does more than
test and return true false, then the name shoudl probably be more like
process_header().
=> Avoid any ambiguity in the expansion of hdr
=> Generally, be more kind to yourself and others reading your code.
=> Have a function name you can call in a natural language syntax:
if (header_in _short_list($line)) {
add_to_simple_header($line, $message_outstream);
...
}
[Ooops--you can call "fudgies" on me, since I slipped in a few extra characters
here. Sorry, my programming language of preference is English]
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>