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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ff744c4726ec64fd X-Google-Attributes: gid103376,public From: David Emery Subject: Re: What is differance between thick and thin binding? Date: 1999/08/12 Message-ID: <120819991745146377%emery@mitre.org>#1/1 X-Deja-AN: 512015056 Content-Transfer-Encoding: 8bit References: <934219556.19836@www.remarq.com> Content-Type: text/plain; charset=ISO-8859-1 X-Complaints-To: usenet@news.mitre.org X-Trace: top.mitre.org 934494319 21661 128.29.123.65 (12 Aug 1999 21:45:19 GMT) Organization: The MITRE Corporation Mime-Version: 1.0 User-Agent: YA-NewsWatcher/4.2.3 NNTP-Posting-Date: 12 Aug 1999 21:45:19 GMT Newsgroups: comp.lang.ada Date: 1999-08-12T21:45:19+00:00 List-Id: In article <934219556.19836@www.remarq.com>, Ronald Caudill 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)