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,d1533431e7e9d2eb X-Google-Attributes: gid103376,public From: Geoff Bull Subject: Re: Nontrivial examples of C interface with Ada Date: 2000/05/25 Message-ID: <392CD183.D4668562@research.canon.com.au>#1/1 X-Deja-AN: 627056257 Content-Transfer-Encoding: 7bit References: <392CC733.13BDDC84@quadruscorp.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@research.canon.com.au X-Trace: cass.research.canon.com.au 959238486 18825 203.12.174.227 (25 May 2000 07:08:06 GMT) Organization: Canon Information Systems Research Australia Mime-Version: 1.0 NNTP-Posting-Date: 25 May 2000 07:08:06 GMT Newsgroups: comp.lang.ada Date: 2000-05-25T07:08:06+00:00 List-Id: tmoran@bix.com wrote: > My preference is to start from the point of view of someone about to > design a spec for some abstraction (socket, Windows clipboard or dialog > box, etc). "How would I do this in Ada?". Then the body tries to > implement the abstraction using C calls. Admittedly, sometimes the > simple, clean, abstraction needs some warts added to allow some of the > strange functions, or to fit the restrictions of, the underlying C, but > usually you can make something reasonably clean. You can't just do a > translation of the C docs, but instead you have something that makes > sense and can be explained, usually, more simply. OTOH, if you make it thin as possible, you don't have to do any docs at all - can't get simpler than that.