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,3ee47b1a6f7a07ac X-Google-Attributes: gid103376,public From: me@me Subject: Re: [question] Ada and DataBase Date: 1999/04/23 Message-ID: <7frg70$l0g@drn.newsguy.com>#1/1 X-Deja-AN: 470250695 References: <7fq1bi$gq5@news.u-strasbg.fr> <3720E1D0.E0EF7B58@Botton.com> Organization: Newsguy News Service [http://www.newsguy.com] Newsgroups: comp.lang.ada Date: 1999-04-23T00:00:00+00:00 List-Id: In article , "Siamak.Lina" says... > > >Sorry for my stupid question but I am wondering what is the meaning of thin >or thick binding. I appreciate any explanation. > > Assume you have some C layer of software (or any other language), with n API's (functions) defined on it that clients can use, this layer is meant to be called by a C linkage interface. So, if you want to also to call this same layer from Ada, you need an Ada binding (a small layer of software that sits between the Ada program, and the C layer). an Ada thin binding means to have an Ada API that maps 1:1 each one of those 'native' C calls to an Ada call. So the Ada API (the small layer of binding software) that you see in your Ada program is very much like the C API, so using the Ada thin binding is very easy if you know the C API, and you can then use the C API documentation as well. (Ada bisning calls uses same number of arguments, same error return status etc.. to large extent). In a Thick API, the Ada API (the binding) is not a 1:1 mapping, it is a new API (form the Ada client point of view) to the lower C layer, where one Ada call, can end up calling a number of those underlying C API calls, i.e. the Ada binding is meant to both allow you to interface to the C layer, and also simplify the interface and to project a higher level of view/abstraction to the system. Usually a thick binding will contain less calls than the C API. (that is the is called think, the Ada think API will do more work internally and has more logic in it than the thin one). The disadvantage of this, is that it is a new API, different than the one most people are used to, and requires new documentaions. The advantages, is that you can give the thick API an Ada look and feel to it, since you are free to not to use the same way the C API was designed, and also you can hide more detailes from the user. (you can for example throw an expection, where the C API might have returned an error status, etc..) hope this helps. me.