comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: GNAT for NT Linking Problem
Date: 1996/09/24
Date: 1996-09-24T00:00:00+00:00	[thread overview]
Message-ID: <dewar.843571136@schonberg> (raw)
In-Reply-To: 3246AB3C.4A17@ubs.com


Klaus wrote:

"It would be crazy the reimplent all that stuff (maybe people in the
military aerea can do that)

So what we need is a quick way to access all this C stuff from Ada.
A standard way to take C or C++ headers and make the this modules
acessible in Ada.

If we don't be able to access all this C,C++ things in a elegant simple
way, more and more applications will change from Ada to C/C++.
The greater productivity of Ada programming doesn't help me if i lose
the time in solving the interface problems to other libraries.

Klaus Wyss
Union Bank of Switzerland"



Well I guess you have not looked much at Ada 95 yet, but in fact everyone
agrees with this in general, and moreover, it is certainly possible to do
this kind of interfacing, and a lot of work has been put in both in the
Ada 95 definition, and in GNAT to make this easi3er, but if this kind of
interfacing is what you need, all the more reason to switch to Ada 95!

Second, for simple operations like To_Upper, you will indeed be better
off using the Ada 95 equivalents because (a) you will often find that
the Unix versions do not handle Latin-1 properly (in Switzerland, this
is presumably of interest) and (b) these can be macros in Unix, which
of course there is no easy way to interface directly to, since they are
C macros.

For Text_IO, it is a toss up, the trouble with the C routines is that they
are weakly typed, and can easily overrwite buffers etc. All this is checked
in Ada, so in the long run, you may save yourselves a lot of boring
debugging by using the safer Ada versions.

But of course for big things, everyone agrees, no one is going to 
reimplement the whole C world in Ada, and such an attempt would be silly
even *if* the resources existed to do it, which they do not!





  parent reply	other threads:[~1996-09-24  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-09  0:00 GNAT for NT Linking Problem Matt O'Hara
1996-09-09  0:00 ` Jonas Nygren
1996-09-09  0:00   ` Michael Feldman
1996-09-23  0:00     ` Klaus Wyss
1996-09-23  0:00       ` Tom Griest
1996-09-24  0:00       ` Robert Dewar [this message]
1996-09-25  0:00       ` Matt O'Hara
1996-09-09  0:00 ` Tom Griest
1996-09-10  0:00 ` Bruce.Conroy
replies disabled

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