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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,14f7200925acb579 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: No Go To's Forever! Date: 2000/03/23 Message-ID: <8bdno8$b66$1@nnrp1.deja.com>#1/1 X-Deja-AN: 601385105 References: <38D7B41D.B3494C6A@lmco.com> <8b8m2e$8201@news.cis.okstate.edu> <8b9fk3$l18$1@nnrp1.deja.com> <38D8DFC2.778826FB@cadence.com> <8barci$4ks$1@nnrp1.deja.com> <38D9233B.D51B16A3@cadence.com> <8bbsl4$ani$1@nnrp1.deja.com> <8bd9ve$r1c$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x22.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Mar 23 18:28:45 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-03-23T00:00:00+00:00 List-Id: In article <8bd9ve$r1c$1@nnrp1.deja.com>, Ted Dennison wrote: > A tool? How would such a tool be written? It looks to me like > you'd need > an Ada parser to hook it to. Not everyone has the ability or > permission > to hack stuff like this into their compiler. Perhaps ASIS > could help, > but not every compiler supports ASIS. Most compilers do support ASIS, and indeed this is a good way or providing such checking tools. This particular check of course is trivial to program, you do not need ASIS > And even if you did have the tool, how are you going to force > maintainers to use it? Perhaps its a bit easier for you to > make edicts like that at ACT, but I often write code that is > owned by the government and will be maintained by whoever they > decide to hire to do the job. Maintainers who are under no constraints can do anything they like, including replacing all your if statements with gotos. Every significant body of code should be accompanied by a rigorous set of coding standards, and competent maintenance should maintain the same set of standards. Yes, Ted, I know you have often complained of living in an environment with limited ability compilers, lack of control over procedures etc, but you should not assume that every environment is like this :-) > Really this is no more of a solution that "lint" is a solution > to C's weak type checking. You definitely need tools to enforce coding standards. There are third party tools, e.g. the Xinotech Composer (hope I am spelling name right) that can do a good job here. As you know GNAT itself includes some extensive style checks corresponding to a significant part of our internal coding standards. Of course this does not include restrictions on gotos, since we have no codified restrictions (it is merely a feature in the language, that, like all other features, should be used when and only when it is appropriate to do so). Again you may complain that you work in an environment where programmers cannot make this kind of decision correctly, but that is not the universal situation. Actually at ACT, we have a systematic procedure where all changes made by one person are reviewed by another person, for both logic and stylistic issues. I consider such a procedure to be essential in any environment, and it is even more important in a maintenance situation. Sent via Deja.com http://www.deja.com/ Before you buy.