Inline, XS, and Gtk2-perl



over the past 2-3 years or so my programming time (both at work and home) is
split around 50/50 between C and PERL, more than that most of the projects i
work on are comprised of C libraries that are brought into PERL using XS. i
also do a decent amount of work with Gtk-perl creating GUI apps that use the
above.

a few days ago i went to take a look at gtk2 and gtk2-perl with the intention
of contributing if i found anything i was interested at looking into. i
checked out a clean cvs copy and set out looking at things. i was a little
more than surprised to see that it was using Inline.

i've used Inline in the past and found it to be advantageous in situations
where you want to do something that requires horsepower in a reasonable amount
of time where there's a function or so of c code you want to get at from perl.
however, i'm my past experience it totally seemed to fall apart when i went to
use it for anything more ambitious.

after looking over the gtk2-perl code Inline seems to have fallen apart here
and been propped back up by the likes of fast-compile and compile-widgets not
to mention the patch to Inline.

hopefully i'm not too far out of line in saying all this, it's not meant as an
attack, but your gonna end up putting as much if not more work into the build
system and workarounds for the fact that your using inline than you will the
actual code. especially once you start trying to compile all all kinds of
systems and out of the ordinary configurations.

i'll give you that there's a little bit of a learning curve to XS, but you'll
put more effort into shoehorning Inline than it would have ever taken to get
past the learning curve of XS. beyond that anyone that comes in with the
intention to help will have the leaning curve of the Inline hacks required
even if they are already proficient in XS and related issues (like myself.)

one of the main features of Inline is that the code is right in the perl
module where you use it, with the code in separate files you've lost that and
with it much of the value of Inline.

another issue is that if build breaks (as it did for me) then no one will have
a clue what to do. with normal Inline or XS builds someone with some expirence
will be able to look into what went wrong. if your build system requires all
of these helper scripts and such they'll (i'll) have no clue where to look
without an in depth study of things.

granted it would be a shame to lose the efforts that have been put into the
build and work arounds thus far, but most of the design decisions and
organization will still hold, so it's not like all of the work would be lost.

i would be willing to help, if you all wish, in the transistion should you all
decide to do so.

-rm





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]