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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1563af5c167aacf2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-25 14:01:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!news.voicenet.com!nntp2.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!news-east.rr.com!news-west.rr.com!cyclone.tampabay.rr.com!news-post.tampabay.rr.com!twister.southeast.rr.com.POSTED!53ab2750!not-for-mail From: David Emery Newsgroups: comp.lang.ada Subject: Re: thick? thin? binding Message-ID: <200620022129217771%demery@cox.rr.com> References: <4519e058.0206200612.5ab7906b@posting.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8bit User-Agent: YA-NewsWatcher/4.2.4 Date: Fri, 21 Jun 2002 01:29:20 GMT NNTP-Posting-Host: 68.100.181.203 X-Complaints-To: abuse@rr.com X-Trace: twister.southeast.rr.com 1024622960 68.100.181.203 (Thu, 20 Jun 2002 21:29:20 EDT) NNTP-Posting-Date: Thu, 20 Jun 2002 21:29:20 EDT Organization: RoadRunner - Cox Xref: archiver1.google.com comp.lang.ada:26701 Date: 2002-06-21T01:29:20+00:00 List-Id: We had a tremendous discussion on this during the POSIX/Ada (IEEE P1003.5) days. It turns out that there are really two dimensions to the problem. We used "thick" vs "thin" to describe the documentation. If the binding has a fully rewritten set of documents, it's a "thick binding". If the binding comes with a document that refers to the underlying binding, it's a "think binding". For example of the latter: The operation Open implements the C operation Open(), with the parameters mapped to Ada types as follows: .... For the actual presentation of API itself, we used the terms "direct" and "abstract". A "direct binding" would make the interface pragmas, etc directly visible. (Hence the name.) An "abstract binding" would hide the underlying C (or whatever) API. As an example of the latter, most POSIX/C operations return -1 to indicate failure, and sett the errno value. We replaced this by the POSIX.POSIX_Error exception, and provided an analog to errno. Additionally, our errno (a function in the package POSIX) was required to be tasking-safe. Depending on how both the Ada binding and the C library was implemented, a direct binding, providing errno : interfaces.c.int; pragma inport (convention => c, entity => errno); might well not be tasking-safe. Although I'm certainly biased, I still think that the best discussion on the issues associated with Ada bindings is the rationale in IEEE Std 1003.5.... dave (editor for the first IEEE 1003.5 standard...)