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,b68ad30ece6a8cb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news2.google.com!news.germany.com!news.belwue.de!kanaga.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Binding or not binding Date: Thu, 01 Feb 2007 09:16:05 +0100 Organization: CERN News Message-ID: References: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1170317765 22758 137.138.37.241 (1 Feb 2007 08:16:05 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Thu, 1 Feb 2007 08:16:05 +0000 (UTC) User-Agent: Thunderbird 1.5.0.9 (X11/20061220) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:8811 Date: 2007-02-01T09:16:05+01:00 List-Id: Ali Bendriss wrote: > I would like to have your opinion about the best way to go in the future, > and in particular if binding a C library is really the way to go. > > When we talk about reuse does it mean reusing the libraries done in an other > language ? > Re-implementing zlib in Ada for example. Is it a waist of time ? > How to choose ? where to start writing in Ada ? One more thing (apart from those already mentioned) that you sometimes have to take into account is that some C libraries cannot be easily rewritten, because their internal working is either not documented, or even not exposed to public at all. There are many projects that provide C API as part of the package and they don't document anything but the interface. In such a case the C library is just a black box and there is nothing really to rewrite. A simple example that I have recently exercised on my own is a C client API to some database server. You don't know how it works internally (and you probably don't want to know), so it's not even clear what "rewriting in Ada" is supposed to mean. If it's open source then you can try to learn the details by reading the code (waste of time anyway), but what would you do if the source is closed? You have C API and nothing else. Bind to it. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/