From: "Dr. Adrian Wrigley" <amtw@linuxchip.demon.co.uk.uk.uk>
Subject: Re: SWIG backend for Ada
Date: Sat, 23 Oct 2004 13:37:28 GMT
Date: 2004-10-23T13:37:28+00:00 [thread overview]
Message-ID: <pan.2004.10.23.13.37.40.50333@linuxchip.demon.co.uk.uk.uk> (raw)
In-Reply-To: 87oeitbvsf.fsf@deneb.enyo.de
On Sat, 23 Oct 2004 11:58:40 +0200, Florian Weimer wrote:
> Is anybody developing a SWIG backend which generates Ada code?
I briefly looked at SWIG a couple of months ago, and thought it might
be interesting. But then other things took precedence.
Now I look at it again, I think this would be a really excellent
project for Ada and Ada users!
The project could replace cbind/c2ada, which I think is ageing
somewhat, doesn't handle C++, and has some tricky dependencies (?)
The great thing is that the Ada community can benefit from the
open source work done by people on the frontend. As I see it,
a lot of the hard work has already been done.
The Ada language interfaces seem very good when you first learn
about them, but when it comes to practical usage, it's a significant
problem keeping packages synchronised with .h C source files.
All the strong typing, error checking etc. goes out of the window
when the .h file is changed and the Ada specification no longer matches.
One day, I would like to see full integration of the Ada compiler
(eg in gnatmake, building .ads files) with C header files so you
can write something like:
with G_Lib_Top;
-- Provide Ada specification from system C header file:
-- gets subprogram declarations and type from glibtop.h
pragma Specification (C_Header, G_Lib_Top, "glibtop.h");
procedure Test is
Var : glibtop; -- Gets record definition from C struct
begin
GLibTop_Init; -- Call C interface
GLibTop_Close;
end Test;
If I have some spare time, I'll have a closer look at the SWIG
distribution, and try to see how much work it would be.
--
Adrian Wrigley, Cambridge, UK
next prev parent reply other threads:[~2004-10-23 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-23 9:58 SWIG backend for Ada Florian Weimer
2004-10-23 11:23 ` Marius Amado Alves
2004-10-23 11:36 ` Florian Weimer
2004-10-23 13:37 ` Dr. Adrian Wrigley [this message]
2004-10-25 10:04 ` Alex R. Mosteo
2004-10-26 0:26 ` Dr. Adrian Wrigley
2004-10-23 18:42 ` Guillaume Foliard
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox