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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92892151eecb310d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-19 10:58:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!news0.telusplanet.net.POSTED!not-for-mail Sender: blaak@blight.transcend.org Newsgroups: comp.lang.ada Subject: Re: Porting Ada to C (Stealth development) References: <3C47375B.8060604@worldnet.att.net> <3C484D86.3DA70C2C@otelco.net> <3C48661F.9C0F316B@otelco.net> From: Ray Blaak Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 Date: Sat, 19 Jan 2002 18:58:45 GMT NNTP-Posting-Host: 209.53.102.3 X-Trace: news0.telusplanet.net 1011466725 209.53.102.3 (Sat, 19 Jan 2002 11:58:45 MST) NNTP-Posting-Date: Sat, 19 Jan 2002 11:58:45 MST Xref: archiver1.google.com comp.lang.ada:19105 Date: 2002-01-19T18:58:45+00:00 List-Id: Larry Hazel writes: > Ray Blaak wrote: > > When (not if!) you fix a bug, do you fix only the C code, or the Ada as > > well? How do you test the Ada fixes? > > Well, you should document your code with comments anyway, and you should > change the comments when you change the code for whatever reason. Actually > the Ada code I wrote probably wasn't compilable anyway (more like pseudo > code), but much more readable than the C code could ever be. It's the only > way I could ever write anything in C. Never have been able to read C and > figure out what it's supposed to be doing. True, comments should be kept in synch. However, pseudo-code comments are a major pain to maintain. If one eliminates them, the amount of work is that much less. There is no reason in the standard languages why actual code cannot be its own pseudo-code. The use of appropriate identifiers and the appropriate decomposition of logic into suitable routines lets the high-level logic of the code be easily seen. C/C++'s basic control flow constructs are not really that much different from Ada's. Even if some arcane bit twiddling is involved, one can always parcel that up behind some suitably named routine. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, blaak@telus.net The Rhythm has my soul.