On 16-May-11 19:19, Donn Cave wrote:
The way I see it, the work that can really benefit multiple languages is the API reference, that can be input to interface generators. We've corresponded about this here before - similar to interface/Window.h, but more easily parsed and with extra information as required by more modern languages.
Yes, I'm leaning toward an approach where we have a single reference file format, that can be used to generate the interfaces for different languages.
(My original idea was to use SWIG, but it's not as flexible as I'd like. In particular, it requires manual editing of the generated code in order to support hooks. With the interface approach, hook support can be built in, and we can support the languages we want, rather than being limited to what SWIG supports.)
Clemens just sent me his pidgen port, and I'll be looking into that over the next few days, but I'm still interested in hearing other ideas about how to approach this.
Basically my idea at this point is to get some kind of interface generator framework going, and smooth out the wrinkles by creating the interfaces for a number of classes for two target languages. Then adding new classes is as easy as writing a new interface definition, and supporting new languages is as "easy" as writing a new generator.