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-Thread: 103376,da047bd41d707e54 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!news.glorb.com!news2!feeder.erje.net!newsfeed-fusi2.netcologne.de!195.14.215.230.MISMATCH!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 18 Dec 2008 13:47:17 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: networking support? References: <494a17a9$0$30226$9b4e6d93@newsspool1.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <494a4655$0$30220$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 18 Dec 2008 13:47:17 CET NNTP-Posting-Host: 98b7f6a7.newsspool1.arcor-online.net X-Trace: DXC==8lRaJ_:KMClU`@c^jLCbJic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbIVNJKER]6RaC;9OJDO8_SKFNSZ1n^B98iJM13lKh:>hmB X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:3033 Date: 2008-12-18T13:47:17+01:00 List-Id: 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.