interrogate2swig.py

This change (if it works) will probably be largely transparent to the developer. Developers will continue to specify the Python interface using the PUBLISHED: section in the headerfiles.

Of course, Swig is relatively well-known, so anyone who wanted to dig into the details of how the build works would have a reasonable chance of knowing straightaway how Swig works; and of course they can use it on other projects.

Would using SWIG make it easier (or harder) for someone to create bindings for other languages such as java or ruby?

Swig supports the following languages:

  • C#
  • Chicken
  • Guile
  • Java
  • Modula-3
  • MzScheme
  • Ocaml
  • Perl5
  • PHP4
  • Pike
  • Python
  • Ruby
  • Tcl

I think its almost as easy as specifying -java instead of -python to generate bindings in java.

Some background on SWIG: “Originally developed in 1995, SWIG was first used by scientists in the Theoretical Physics Division at Los Alamos National Laboratory for building user interfaces to simulate codes running on the Connection Machine 5 supercomputer. In this environment, scientists needed to work with huge amounts of simulation data, complex hardware, and a constantly changing code base. The use of a scripting language interface provided a simple yet highly flexible foundation for solving these types of problems. SWIG simplifies development by largely automating the task of scripting language integration−−allowing developers and users to focus on more important problems.”

Hugh