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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a3446063322b22cb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: Thick vs. Thin bindings Date: Fri, 26 Nov 2004 16:55:56 +0000 Organization: Cuivre, Argent, Or Message-ID: References: <41a746a0@x-privat.org> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1101488160 94465 212.85.156.195 (26 Nov 2004 16:56:00 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 26 Nov 2004 16:56:00 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en In-Reply-To: <41a746a0@x-privat.org> X-OriginalArrivalTime: 26 Nov 2004 16:55:21.0082 (UTC) FILETIME=[B70EE5A0:01C4D3D8] X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:6514 Date: 2004-11-26T16:55:56+00:00 Jeff Houck wrote: > As I continue to evaluate Ada in the role of a game dev language, I've > run across references to "thick" and "thin" bindings and I'm a bit > confused. > My initial design goals are to keep the number of external dependancies > to a minimum with most of the support code written in Ada. I would like > the code interfaces to be as simple as possible to implement for a > designer. I believe this would necessitate a "thick" binding. Is that > correct? Would anyone like to elaborate on the pros and cons of these > two binding methodologies? Further reading material? Tutorials? Thx! Thick and thin are ends of a spectrum. Usually a binding is somewhere inside the range but not exactly at one end. An Ada binding is an Ada unit that represents some external system. Usually the Ada unit is a package and the external system is a C function library. Here the thin extreme of the spectrum would correspond to the most one-to-one mapping you could make between the Ada entities and the C entities. My package Pgsql [1] provides a nice pedagogical example. It has three software levels: 1. Ada package Pgsql 2. Ada package Libpq 3. C function library "libpq" Unit 1 depends on 2 depends on 3. The binding 2-3 is the thinest, and 1-3 is the thickest. [1] Pgsql is a minimal Postgres binding available at http://www.liacc.up.pt/~maa/files/Pgsql.zip