allowing braces around suites
jerf at jerf.org
Mon Aug 30 06:32:05 CEST 2004
On Mon, 30 Aug 2004 10:54:08 +1000, Delaney, Timothy C (Timothy) wrote:
> Igor V. Rafienko wrote:
>> As a side note -- my last employer had absolutely horrible coding
>> conventions. No one liked them (developers and management included).
>> However, everyone had to comply, and despite an occasional nastiness,
>> the bug that you illustrated could not have happened in that
>> environment, because _every_ if was required to have its body within
> In C/C++/Java, that's a sensible coding convention. I won't quibble that
> there may have been other ones in the coding standards that were bad,
> but that specific example is not.
It is a continual surprise to me that the Great Mother of TMTOWIDI
(Perl) actually got this right.
(In Perl, "if", "for", and friends all *require* braces when used
conventionally. When used as a suffix ("print $x if $iShould;"), it
doesn't, but I don't find that offensive.... partially because I only
rarely use it.)
More information about the Python-list