[ 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:
|
|