On 01/10/02 00:16 -0400, Mitchell N Charity wrote:
> SWIG (http://www.swig.org/) does some nice parsing and glue generation.
> In particular, it has rather broader coverage of C++ than Inline::CPP
> (templates, operators, etc).
> 
> Perl's Inline (http://www.perldoc.com/cpan/Inline.html) is sometimes
> more convenient.  Particularly for small bits of code.  Glue generation,
> compilation, caching, and linking, all happen automagically.  And it
> facilitates run-time code generation.
> 
> So I wrote an Inline::SWIG
>   http://www.vendian.org/mncharity/dir3/inline/swig/

Mitchell, This sounds awesome. You're a genius. Any chance of putting it
on CPAN? I could help you there.

I'm wondering, is it abstract enough so that we could just make it part of
Inline? We could let people pick what type of glue code they want.

I was thinking of writing my own glue code, sans XS, so that we could get rid
of XS altogether. We could do it without Makefile.PL too which I think would
make code generation/compiling very fast. Just:

   - Parse using your regex parser (instead of RecDescent)
   - Generate pure C glue
   - Feed it right to gcc

So now we'd have three different gluing options

   - SWIG
   - XS
   - IngyLine

Don't worry folks, I won't throw out the XS for good. It's way too stable.
But a faster option might be good for some applications.

Cheers, Brian

Reply via email to