comp.lang.ada
 help / color / mirror / Atom feed
From: David Emery <emery@mitre.org>
Subject: Re: What  is differance between thick and thin binding?
Date: 1999/08/12
Date: 1999-08-12T21:45:19+00:00	[thread overview]
Message-ID: <120819991745146377%emery@mitre.org> (raw)
In-Reply-To: 934219556.19836@www.remarq.com

In article <934219556.19836@www.remarq.com>, Ronald Caudill
<anonymous@web.remarq.com> wrote:

> Hi:
> I see the terms "Thick binding" and "Thin binding"
> referring to making other technologies usable with Ada.
> What is the differance between these two?
> 

Within the POSIX community, this actually referred to the size
of the document, rather than the nature of the binding.  A "thin"
binding would refer to the underlying base standard by reference.
A "thick" binding would provide a complete description of the 
semantics.  

For example, here's a thin binding:

   function Get_Working_Directory return string;
       See POSIX.1, clause x.x.x, for the operation getcwd()
   
A thick binding would say:

   function Get_Working_Directory return string;
      This operation returns the process's current default directory,
      which is the starting point for resolving relative pathnames
      (qv).  
      ...

Note that both of these examples provide an abstraction away from the
C equivalent, getcwd().  The difference is not in the actual code,
but in how it's documented.  

A binding that moved away from the semantics of the base document we
called an "abstract" binding, because it abstracted the semantics.  The
"pragma interface" kind of binding we'd call a "direct" binding, because
it directly mapped to the underlying base document.  A "direct" binding
for getcwd() would be:

   function getcwd (the_param : in char_star) return char_star;
   pragma interface (C, getcwd);
       See POSIX.1 caluse x.x.x for the operation getcwd().  
(In this case, the type char_star is an access type.)

At this point, it should be 'obvious' that an "abstract" binding implies
a "thick" document.  

POSIX.5 is the 'canonical' example of an abstract binding and a thick
document.  Bindings generated by various binding generator tools
are examples of direct bindings, presumaby documented by thin documents
(If they have any separate documentation at all....)

Personally, my experience says that your investment to generate a good 
Ada abstraction pays off in the long run.  However, "the marketplace"
has generally gone for thin/direct techniques, as requiring much less
investment to gain Ada access to C/Java/whatever features.  Others argue
that the biggest gain from thin/direct bindings is their ability to
reuse documentation (manuals, textbooks, etc) that relate to the 
underlying C/Java/whatever interface, and there's a lot to be said
for that view.

                  dave
                  (Tech Editor, POSIX.5)




      parent reply	other threads:[~1999-08-12  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <934219556.19836@www.remarq.com>
1999-08-09  0:00 ` What is differance between thick and thin binding? tmoran
1999-08-09  0:00 ` John Duncan
1999-08-10  0:00   ` Marin David Condic
1999-08-10  0:00     ` Stephen Leake
1999-08-10  0:00     ` tmoran
1999-08-11  0:00     ` John Duncan
1999-08-10  0:00 ` David Botton
1999-08-12  0:00 ` David Emery [this message]
replies disabled

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