From: Rakesh Malhotra <rakesh.malhotra@pop.safetran.com>
Subject: Re: PRECOMPILATION
Date: 1999/02/18
Date: 1999-02-18T00:00:00+00:00 [thread overview]
Message-ID: <7aickf$pb4$1@news-1.news.gte.net> (raw)
In-Reply-To: 7ahor8$otv@news1.newsguy.com
Samuel Mize wrote:
>
> Tucker Taft <stt@averstar.com> wrote:
> You'll have to provide
> some higher-level package that interacts with the system, instead
> of just embedding code to do low-level system things throughout
> your program....
>
> C-experienced people probably expect platform-specific issues to be
> shot through the whole program, like cancer. ...
>... [snipped]
> So they fear the spectre of having to maintain parallel files for
> a huge number of units, and getting their logic out of synch.
> ... [snipped]
> This is greatly reduced by using Ada's strong typing and separate
> compilation capabilities. Once you've set up a fairly small
> platform interface, all the rest of the source code is invariant.
> But it takes a bit of experience to really believe that.
> ... [snipped]
> Again, Ada largely takes care of this concern. If you missed an
> element that you need in one of your platform-specific files, the
> program won't compile. It's actually easier to maintain most
> cross-platform dependencies in Ada, once you adapt your design to
> the Ada mindset.
>
Thanks for the enlightening explanation above. I have not done any
cross-platform coding in C or Ada but have often wondered how one would
do the equivalent of the C preprocessor stuff in Ada.
I have ported bought-in 3rd party libraries written in C to my platform
(e.g. a TCP/IP library for an embedded platform). You are correct in
saying that the cross-platform stuff (e.g. size of a variable) is shot
through the whole program and it makes reading the code quite
difficult. In the libraries I bought it was quite a nightmare till,
after staring at the code for a couple of weeks, I started to understand
all the dependencies.
Would it be possible to give an Ada example of how you would do what you
have suggested in your message above ? i.e. what kind of things does
one put into the platform specific packages, does one not land up with
having to maintain many such packages versus just 1 file in the C case
etc ? Some code that highlights your explanation will help.
Thanks
Rakesh
next prev parent reply other threads:[~1999-02-18 0:00 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-09 0:00 PRECOMPILATION =:-) Vincent
1999-02-09 0:00 ` PRECOMPILATION Larry Kilgallen
1999-02-09 0:00 ` PRECOMPILATION Pascal MALAISE
1999-02-09 0:00 ` PRECOMPILATION Tucker Taft
1999-02-09 0:00 ` PRECOMPILATION Tom Moran
1999-02-10 0:00 ` PRECOMPILATION dennison
1999-02-10 0:00 ` PRECOMPILATION Corey Ashford
1999-02-10 0:00 ` PRECOMPILATION robert_dewar
1999-02-09 0:00 ` PRECOMPILATION Tom Moran
1999-02-10 0:00 ` PRECOMPILATION Pascal MALAISE
1999-02-10 0:00 ` PRECOMPILATION Tom Moran
1999-02-11 0:00 ` PRECOMPILATION Pascal MALAISE
1999-02-12 0:00 ` PRECOMPILATION robert_dewar
1999-02-14 0:00 ` PRECOMPILATION Pascal MALAISE
1999-02-09 0:00 ` PRECOMPILATION Tom Moran
1999-02-10 0:00 ` PRECOMPILATION Pascal MALAISE
1999-02-10 0:00 ` PRECOMPILATION Tom Moran
1999-02-09 0:00 ` PRECOMPILATION Marin David Condic
1999-02-09 0:00 ` PRECOMPILATION Tucker Taft
1999-02-10 0:00 ` PRECOMPILATION Fraser Wilson
1999-02-18 0:00 ` PRECOMPILATION Samuel Mize
1999-02-18 0:00 ` PRECOMPILATION robert_dewar
1999-02-18 0:00 ` Rakesh Malhotra [this message]
1999-02-19 0:00 ` PRECOMPILATION Samuel Mize
1999-02-28 0:00 ` PRECOMPILATION Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox