Re: Binding or not binding
- From: Jeffrey Creem <jeff@xxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 08:21:07 -0500
Ali Bendriss wrote:
Could you please first excuse me if my past and maybe future posting in this group were (will be) sometimes awkward. But I will really like to be more active using and promoting Ada.
I was really interested by the thread about "How come Ada isn't more popular?"
I would like to have your opinion about the best way to go in the future, and in particular if binding a C library is really the way to go.
When we talk about reuse does it mean reusing the libraries done in an other language ? Re-implementing zlib in Ada for example. Is it a waist of time ?
How to choose ? where to start writing in Ada ?
If I need some compression lib like jpeg2k for example which way to go ?
I would love to be able to manipulate some DICOM image format in Ada for example. Most of the actual project implementing the DICOM standard are in C++ and java. Is it only a question of money (project funding) ?
Thanks for your feedback in the professional and the hobbyist side.
It depends on your goals. In general, the conventional wisdom is that you should simply bind to existing libraries and as a general rule, this usually makes sense. However, having said that, the net is full of libraries in a variety of languages implemented natively in that language and the existence of these native libraries is sometimes what makes people call those languages "good".
So, if my goal is to just get some work done, and I need the functionality of some library, and the functionality is non-trivial, I'll usually go the binding route.
If I want functionality and existing libraries don't provide it and/or provide it in a manner that is not really what I want, I start to consider writing a native version.
Sometimes dealing with either the build process, license terms, compiler requirements of an existing library is nearly as much work as just writing and maintaining a native version. Finding this tipping point will depend on a lot of factors but certainly for functionality <~ 100 lines of code, the intellectual overhead of a binding and another language is usually not worth it.
Having something like SWIG working and well understood for Ada would certainly help bring bindings along.
Work is progressing in that area but I have not really looked at progress recently.
- Binding or not binding
- From: Ali Bendriss
- Binding or not binding