comp.lang.ada
 help / color / mirror / Atom feed
From: Ray Blaak <blaak@telus.net>
Subject: Re: Porting Ada to C (Stealth development)
Date: Sat, 19 Jan 2002 18:58:45 GMT
Date: 2002-01-19T18:58:45+00:00	[thread overview]
Message-ID: <m33d12w4oc.fsf@blight.transcend.org> (raw)
In-Reply-To: 3C48661F.9C0F316B@otelco.net

Larry Hazel <lhhazel@otelco.net> 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.



  parent reply	other threads:[~2002-01-19 18:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-17 14:44 Porting Ada to C (Stealth development) Dale Pontius
2002-01-17 19:47 ` Dan Andreatta
2002-01-18 14:12   ` Dale Pontius
2002-01-18 19:15     ` Dan Andreatta
2002-01-18 22:44       ` Zoran
2002-01-18 23:13     ` Frode Tennebø
2002-01-18 17:13   ` Ray Blaak
2002-01-20 19:43     ` Nick Roberts
2002-01-21 11:13   ` Peter
2002-01-17 20:43 ` Jim Rogers
2002-01-18 14:19   ` Dale Pontius
2002-01-18 16:29     ` Larry Hazel
2002-01-18 17:21       ` Ray Blaak
2002-01-18 18:14         ` Larry Hazel
2002-01-18 20:25           ` tmoran
2002-01-19  7:32             ` Simon Wright
2002-01-19 18:58           ` Ray Blaak [this message]
2002-01-18 17:18     ` Stephen Leake
2002-01-18 23:04     ` Brian Rogoff
2002-01-19  7:34       ` Simon Wright
2002-01-20 17:32         ` Brian Rogoff
2002-01-18 19:48 ` Ted Dennison
2002-01-18 20:02   ` Wes Groleau
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox