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,632dbd0caea19836 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: System calls - GNAT library vs. direct bindings References: <1180623520.303981.191090@q75g2000hsh.googlegroups.com> <1180730725.902452.161820@m36g2000hse.googlegroups.com> In-Reply-To: <1180730725.902452.161820@m36g2000hse.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1180762541 12.201.97.213 (Sat, 02 Jun 2007 05:35:41 GMT) NNTP-Posting-Date: Sat, 02 Jun 2007 05:35:41 GMT Organization: AT&T ASP.att.net Date: Sat, 02 Jun 2007 05:35:41 GMT Xref: g2news1.google.com comp.lang.ada:16045 Date: 2007-06-02T05:35:41+00:00 List-Id: Maciej Sobczak wrote: > > Bingo. And calling system API directly also requires a wrapper - at > least for convenience. Interestingly, for funcions as simple as read/ > write/listen/etc., both wrappers will have comparable complexity. > Note that no matter how the wrapper is written, it isolates two > parties and as such can be later used to achieve freedom from both > compiler and system. IIRC, you were talking about a thin binding. To my mind, at least, a thin binding is not comparable to a portable wrapper. Depending on circumstances, a thin binding can sometimes be a single package spec with some pragma-Import subprograms (probably not in this case). Many difficult issues are left to the client. More importantly, a binding, thin or otherwise, has to deal with the vagaries of interfacing to C, and is more difficult to get right than a wrapper around an Ada library, which is simply Ada calling Ada. -- Jeff Carter "Propose to an Englishman any principle, or any instrument, however admirable, and you will observe that the whole effort of the English mind is directed to find a difficulty, a defect, or an impossibility in it. If you speak to him of a machine for peeling a potato, he will pronounce it impossible: if you peel a potato with it before his eyes, he will declare it useless, because it will not slice a pineapple." Charles Babbage 92