comp.lang.ada
 help / color / mirror / Atom feed
* Re: Rocket Science?
@ 1994-12-08 17:13 Bob Crispen
  1994-12-08 16:23 ` David Emery
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Crispen @ 1994-12-08 17:13 UTC (permalink / 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|
+-------------------------------+--------------------------------------+



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-12-08 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-12-08 17:13 Rocket Science? Bob Crispen
1994-12-08 16:23 ` David Emery

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