comp.lang.ada
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Book to learn GtkAda
Date: Sat, 20 Oct 2001 19:03:21 +0200
Date: 2001-10-20T19:03:21+02:00	[thread overview]
Message-ID: <87d73iutuu.fsf@deneb.enyo.de> (raw)
In-Reply-To: 9qpsh8$lf5$2@drcomp.erfurt.thur.de

Adrian Knoth <adi@drcomp.erfurt.thur.de> writes:

> Think of PostgreSQL: there is a thick binding, I need libpq for it,
> but it works very well. Ok, that's what you're saying: it works, use
> it and do something interesting with it.

There are some drawbacks.  For example, notifications are handled in a
way which is not very Ada-friendly, and by writing a binding to libpq,
you can hardly get rid of this.

> OTOH libpq itself could be implemented in Ada. I guess you'll find
> a wrapped socket()-function in it. If there is a better abstraction
> we even can get rid of this by providing a direct kernel-Interface.

That's the way I'm going to implement the next PostgreSQL binding.  (I
think it's the third one.)

> Don't ask me why, but I think this is better. You can use the main
> Ada-features across your libraries, you don't need to convert types
> between C and Ada, get all the checkings and so on.

I agree.  In addition, on GNU/Linux on 32 bit systems, you can avoid
some problems the C API currently has: 16 bit UID/GID types and 32
bit file offsets and inode numbers.  Of course, you can compile your
software with the appropriate flags (at least for the 64 bit file
system interface), but you still don't know if the library you use
works with large files, for example.

Starting mostly from scratch is quite a bit of work. but you can
correct such mistakes (and introduce others).  However, some problems
are very hard to correct, e.g. the interaction of seteuid(), open()
and tasking, or fork(), signals and tasking.



  reply	other threads:[~2001-10-20 17:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-17 21:29 Book to learn GtkAda Michael Bode
2001-10-18  6:43 ` David Starner
2001-10-18  8:58 ` Preben Randhol
2001-10-18 17:18   ` David Starner
2001-10-18 19:56     ` Adrian Knoth
2001-10-19 14:08       ` David Starner
2001-10-19 18:48         ` Adrian Knoth
2001-10-20 17:03           ` Florian Weimer [this message]
2001-10-19 14:20       ` Ted Dennison
2001-10-19 14:30         ` David Botton
2001-10-20  2:01           ` DuckE
2001-10-20 16:34             ` David Starner
2001-10-19  9:04     ` Preben Randhol
replies disabled

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