[Prev][Next][Index][Thread]
Re: Multiple dispatch / multimethods??
"Eric Gouriou" <eric_gouriou@pobox.com> wrote in message news:3B5FA67C.2481D5E9@pobox.com...
> Note: at work we have been using SWIG (1.1 not the latest 1.3 versions)
> to interface a Python command line tool with a C API. I have been less
> than impressed by the quality of some of the code it includes in this
> scenario, and by the limitations this version has when dealing with C
> structures. It has sometimes been a limiting factor in our API development.
>
> The performance of some of this code is also less than stellar. SWIGGetPtr
> is _not_ coded for performance.
>
> Disclaimer: I haven't looked at SWIG 1.3.x code. Things may have improved.
> If not we'll probably send patches to the maintainers when we upgrade to
> a newer version. I think we owe this to the developpers and
> to the community.
>
> It has however been a great timesaver overall, so I don't want to detract
> you from SWIG altogether. Caveat user, that's all :-).
Eric,
Thanks for the tips. I wasn't really thinking of using it, but I like
to store these things away in the back of my mind in case something
crops up later on.
I'm thinking more along the lines of generating language bindings
(and the C library itself) directly from an interface/implementation
database. This avoids any parsing altogether and keeps everything
consistent; changes only have to be made in one place. I haven't
seen anything like this around have you?
I was going to use IDL as the interface language, but I've decided
against it because it doesn't support some of the things I want to do,
like pre/post condtions. With database tables, I don't need to parse
any IDL, much simpler IMO.
Cheers,
Mark.
Follow-Ups:
References: