comp.lang.ada
 help / color / mirror / Atom feed
From: David Emery <demery@cox.rr.com>
Subject: Re: thick? thin? binding
Date: Fri, 21 Jun 2002 01:29:20 GMT
Date: 2002-06-21T01:29:20+00:00	[thread overview]
Message-ID: <200620022129217771%demery@cox.rr.com> (raw)
In-Reply-To: 4519e058.0206200612.5ab7906b@posting.google.com

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...)



  reply	other threads:[~2002-06-21  1:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19 18:53 thick? thin? binding Immanuel Scholz
2002-06-19 19:22 ` tmoran
2002-06-19 19:27 ` Stephen Leake
2002-06-19 19:50   ` Immanuel Scholz
2002-06-19 20:25     ` tmoran
2002-06-19 19:27 ` chris.danx
2002-06-19 19:28 ` Stephen Leake
2002-06-20 14:12 ` Ted Dennison
2002-06-21  1:29   ` David Emery [this message]
2002-06-26  0:23     ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox