comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: networking support?
Date: Thu, 18 Dec 2008 13:47:17 +0100
Date: 2008-12-18T13:47:17+01:00	[thread overview]
Message-ID: <494a4655$0$30220$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <giddji$jug$1@online.de>

Oliver Kowalke schrieb:
> is it true that I can call C functions and C++
> classes from Ada?

You can call C functions (and probably anything that
uses C calling conventions, on the same platform).
Have a look at Interfaces.C.  This package is defined
by the Ada language.

A similar feature exists for C++ classes, at least
with some compilers, covering some amount of C++.

> If yes - what is the prefered usage: should I implement functionality (for
> isntacne networking) in C++ classes and call them from Ada or use the
> C-functions (system calls) and implement the classes/behaviour in Ada (get
> benefits from Ada's safety)?

How would your program benefit from first wrapping system
functions (that use C conventions) in C++ classes only for
having to match Ada's O-O types and C++'s O-O types in
a second step?
Seems like an artificial setup to me.



  reply	other threads:[~2008-12-18 12:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17 18:33 networking support? Oliver Kowalke
2008-12-18  9:28 ` Georg Bauhaus
2008-12-18 11:55   ` Oliver Kowalke
2008-12-18 12:47     ` Georg Bauhaus [this message]
2008-12-19 21:49       ` Maciej Sobczak
2008-12-19 23:05         ` Oliver Kowalke
2008-12-20 19:23           ` Maciej Sobczak
2008-12-21 17:57             ` Oliver Kowalke
2008-12-21 22:21               ` Maciej Sobczak
2008-12-19 23:57         ` Georg Bauhaus
2008-12-18 18:09   ` Jeffrey R. Carter
2008-12-18 18:30     ` Georg Bauhaus
2008-12-18  9:54 ` Jacob Sparre Andersen
2008-12-18 16:14 ` anon
replies disabled

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