Great Circle Associates Majordomo-Workers
(November 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Coding style
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Tue, 26 Nov 1996 09:00:45 -0600 (CST)
To: majordomo-workers @ GreatCircle . COM
Cc: Brent @ GreatCircle . COM, tibbs @ hpc . uh . edu, brozen @ webdreams . com, cwilson @ neu . sgi . com
In-reply-to: <199611261403.GAA22450@hps12.iasl.ca.boeing.com> from "Vincent D. Skahan" at Nov 26, 96 06:03:23 am
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

[ Brent Chapman writes: ]
> 
> In all seriousness, though, there is a code maintenance principle
> that, when working on existing programs, you code in the style they
> were written in, even if that's not precisely your own style.

In general, I concur with Brent on the principle of using the context
style, and do try to adhere to it when I can, but I also believe this
holds true for using the context language, and that principle overrides
the context style principle. For example, if previous authors appear
to be trying to write in C using Perl, I feel I'm more than justified
in using Perl constructs rather than rigidly adhering to C constructs
expressed in Perl. For that reason I will usually write:

    print qq(File is "$burfl"\n)    unless defined $foo;

instead of:

    if (!defined($foo)) {
	print("File is \"$burfl\"\n");
    }

(or any whitespaced variants.)

-- 
 Dave Wolfe


Follow-Ups:
References:
Indexed By Date Previous: Re: Coding style
From: "Vincent D. Skahan" <vds7789@hps12.iasl.ca.boeing.com>
Next: approved command
From: "James B. Byrne" <byrnejb@harte-lyne.ca>
Indexed By Thread Previous: Re: Coding style
From: "Vincent D. Skahan" <vds7789@hps12.iasl.ca.boeing.com>
Next: Re: Coding style
From: Arnaud Taddei <Arnaud.Taddei@cern.ch>

Google
 
Search Internet Search www.greatcircle.com