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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1563af5c167aacf2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-19 12:33:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: thick? thin? binding Date: 19 Jun 2002 15:27:22 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1024515310 12195 128.183.220.71 (19 Jun 2002 19:35:10 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 19 Jun 2002 19:35:10 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:26427 Date: 2002-06-19T19:35:10+00:00 List-Id: Immanuel Scholz 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