[Kde-bindings] PerlQt bindings ans SWIG ?
Richard Dale
rdale at foton.es
Thu Jun 4 17:48:54 UTC 2009
On Thursday 04 June 2009 05:58:36 pm Dominique Dumont wrote:
> Hello
>
> I just wonder if generating Qt binding for Perl with SWIG [1] was
> considered ?
I did try to update some existing SWIG based Ruby Qt bindings from Qt2 to Qt3
before the PerlQt Qt3 was started. However, back in early 2002 the Ruby
version of SWIG couldn't handle overloaded method calls or allow virtual
methods to be overriden. So in the end I decided that the results weren't
really good enough and scrapped the project.
The Smoke libs tend to be smaller than conventional alternatives. On reason is
that the overloaded method resolution is handled in each language's runtime,
as opposed to being done in the generated code with the same logic duplicated
many times over.
> SWIG is able to parse C++ header files and generate the bindings for Perl
> (among other languages like Python, Ruby Java) See [2] for more details.
>
> Would that be possible ?
Although SWIG works for multiple target languages, it generates different code
for each one and you also need to maintain language specific interface files.
The Smoke libs are generated directly from the headers and can be used by
multiple languages (Perl, Ruby, PHP, C# and Common Lisp at present). Having
common libs for different languages is less important if you are only doing Qt
programming, but I think it is quite a big advantage with KDE bindings.
-- Richard
More information about the Kde-bindings
mailing list