comp.lang.ada
 help / color / mirror / Atom feed
From: Bob Crispen <crispen@EIGHT-BALL.HV.BOEING.COM>
Subject: Re: Rocket Science?
Date: Thu, 8 Dec 1994 11:13:07 CST
Date: 1994-12-08T11:13:07-06:00	[thread overview]
Message-ID: <9412081713.AA03077@eight-ball.hv.boeing.com.hv.boeing.com> (raw)

David Emery <emery@GOLDFINGER.MITRE.ORG> sez:

>>Developing Ada bindings isn't rocket science; it's well within the
>>capabilities of somebody with a year or two of Ada experience.
>
>Oh, I beg to differ.  There's an art to doing bindings.  I've seen
>(been victimized) by Ada bindings developed by junior people.  Right
>now I'm trying to rework some bindings that fit that pattern.  The guy
>did a nice job given his level of experience, but there are some
>serious problems that affect both usage and implementation.

OK, perhaps I was a little too cavalier.  Yup, it's altogether
possible to make a bad set of bindings.  I did a set of socket
bindings that has:

   type Domains_And_Address_Families is (
      AF_UNSPEC,             -- Unspecified
      AF_UNIX,               -- Unix internal protocols...

   for Domains_And_Address_Families use (
      AF_UNSPEC    =>  0,
      AF_UNIX      =>  1,...

   type Domains is new Domains_And_Address_Families;
   for Domains'size use 32;

   type Address_Families is new Domains_And_Address_Families;
   for Address_Families'size use 16;

which I think is a sensible way to approach this particular problem.

I suppose you *could* write:

   subtype Domains is Integer;
   subtype Address_Families is Short_Integer;

   AF_UNSPEC : constant := 0;

and so on, and technically that would count as bindings.

Perhaps I shouldn't have implied that writing good bindings is easy.
Writing good software is hard.  But I still think if you've got the
kind of genes that make you an eager Ada programmer instead of a
frustrated FORTRAN programmer doing Ada, you can probably put out a
decent set of bindings after a couple of years of experience.

At any rate, I've probably provided sufficient evidence that my own
level of writing bindings is so bad that I'm missing the whole point,
if that should be the case.
+-------------------------------+--------------------------------------+
| Bob Crispen                   |   Who will babysit the babysitters?  |
| crispen@foxy.hv.boeing.com    +--------------------------------------+
| (205) 461-3296                |Opinions expressed here are mine alone|
+-------------------------------+--------------------------------------+



             reply	other threads:[~1994-12-08 17:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-08 17:13 Bob Crispen [this message]
1994-12-08 16:23 ` Rocket Science? David Emery
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox