From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ec4cde5d799065b6 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Coding Standards & GOTO Date: 1997/09/24 Message-ID: #1/1 X-Deja-AN: 275417597 References: <01bcc32e$350b5ba0$6409868b@gateway> <5vqm61$fu2$1@cf01.edf.fr> <3422F037.41CA@lmco.com> <3423AF1B.5152@i.b.m.net> <3426B51E.7296@lmco.com> <3427E983.6CAC@hazeltine.com> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-09-24T00:00:00+00:00 List-Id: In article <3427E983.6CAC@hazeltine.com>, rose@hazeltine.com wrote: >We have a coding standard that only contains absolute rules (and >prohibits GOTOs). But the coding standard also says that deviations are >permitted provided the file header identifies each deviation and >provides a justification. No approvals are needed. My advice to writers of coding standards to NOT follow the above advice. We tried this on a recent project and guess what: no one even reads the header. Don't publish absolute rules, publish guidelines, and enumerate the times when the guideline doesn't apply. If you the programmer are unsure whether an approach is controversial (say, using goto's to write a scanner), then get some advice from the good programmers on your staff. Advice from a peer whom you respect carries a lot more weight than absolute rules handed down from Moses. See Scott Meyers' Effective C++ books, and the Taligent Guide too, for excellent examples of what a coding standard look like. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271