[Haskell-cafe] Re: What *not* to use Haskell for

Henning Thielemann lemming at henning-thielemann.de
Tue Nov 11 08:46:52 EST 2008

On Tue, 11 Nov 2008, Jefferson Heard wrote:

> Actually, one language you mention there *is* worse than the others
> for writing wrappable library code: C++.  Admittedly, they've got a
> Python interface now via boost, but the main problem with writing
> wrappable C++ code is the template system and the inheritence systems
> getting in the way.  Symbol names aren't predictable and not
> standardized, so it becomes impossible to write a portable system for
> finding and binding to functions in a library.  I've not yet found a
> good way to do it in FFI code, and I would love to, as one library in
> particular I hold near and dear -- OpenSceneGraph -- is entirely
> written in C++.

SWIG helps wrapping C++ libraries by providing C wrappers to C++ 
functions. However, as far as I know, templates cannot be wrapped as they 
are, but only instances of templates. Thus there is no wrapper to STL.

More information about the Haskell-Cafe mailing list