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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Example Ada calling Gnu Scientific Library (GSL) Date: Wed, 29 Mar 2017 15:07:22 -0500 Organization: JSA Research & Innovation Message-ID: References: <2b035819-e55e-4805-9ff1-a2cec09f13e0@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1490818043 25628 24.196.82.226 (29 Mar 2017 20:07:23 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 29 Mar 2017 20:07:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:46501 Date: 2017-03-29T15:07:22-05:00 List-Id: "hreba" wrote in message news:ek15faF6958U1@mid.individual.net... > On 03/29/2017 03:29 AM, Leo Brewin wrote: >> Hi Folks, >> >> I've been following the discussion about the thin bindings to the GSL >> library (and thanks to all for the useful information). >> > > Thanks for the example. Nevertheless, I think it is only a first step, > because I would prefer an interface to the C library where the client does > not have to use the type Interfaces.C.double, or even import Interfaces. Surely. But the point is that you can use these steps to relatively easily make a working thin binding. You then write your intended interface (the thick binding) by directly using the thin binding in Ada. That should work without stressing the Ada compiler and causing weird failures. (That's how the best Ada bindings are built; you have a direct thin binding and then a thicker binding that makes the thin binding more appropriate for Ada by introducing exceptions, generics, default parameters, sensible Ada naming (no camel case!), and so on.) Randy.