comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: thick? thin? binding
Date: 19 Jun 2002 15:28:15 -0400
Date: 2002-06-19T19:35:59+00:00	[thread overview]
Message-ID: <uit4fukz4.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: aeqjst$96ip3$1@ID-100557.news.dfncis.de

Immanuel Scholz <news@kutzsche.net> writes:

> Hi,
> 
> I read through 1 and a half Ada book and still doesnt catch what "thick" or 
> "thin" binding mean... 

It's not really an Ada concept; it's a general concept.

> I know "flat" binding from C or "name mangling" from C++. It this
> related to this?

No.

Let me give an example. Microsoft Windows has a large API, called
Win32. There is a "thin" binding to this, called Win32Ada.

The thin binding directly imports the C functions. So whereever the C
function uses a pointer, you get a parameter of type System.Address.
Wherever the C function uses a string, it must be null-terminated.

A "Thick binding" to Win32 would use either Ada access types or just
"in out" parameters, instead of System.Address. It would also use Ada
String instead of null-terminated strings. Typically, this requires
intermediate code to convert between the too. The amount of this
intermediate code determines the "thickness" of the binding.

An even thicker binding (like Windex,
http://users.erols.com/leakstan/Stephe/Ada/windex.html) goes beyond
that. It replaces the "window message handlers" of the Win32 API with
dispatching on Window_Type objects.

Hope this helps.
-- 
-- Stephe



  parent reply	other threads:[~2002-06-19 19:28 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 [this message]
2002-06-20 14:12 ` Ted Dennison
2002-06-21  1:29   ` David Emery
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