incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Balmain" <>
Subject Re: PHP blinding for Lucy?
Date Wed, 28 Feb 2007 06:19:56 GMT
On 2/28/07, Marvin Humphrey <> wrote:
> > Of course you could also have public and private include files.
> Hmm, can you elaborate?  I'd basically given up hope that we'd be
> able to maintain tight control over symbol export, and was expecting
> to define the API via documentation only.

I haven't tried this before and I'm not sure if other large C projects
do this but I was thinking you could have two sets of include files;
one that contains the public API and the other used to contain methods
used internally within Lucy. For example, an IndexWriter.h and an

One way I am planning on cutting down on public methods is by keeping
the unit tests in the same file as the source code, surrounding them
with an #ifdef UNIT_TESTS. A lot of the methods in Ferret would be
static except that I needed to make them available for unit testing.

> Now, returning to your point about Doxygen... With XML, we'd have to
> maintain separate files for the documentation, which would suck.  So
> I'm all for using Doxygen, especially if we can rig things up so that
> the description can be isolated and parsed out reliably.
> I might go write an extractor tool which parses our header files and
> generates intermediate XML.

Well, I definitely think it might be a good idea to look at doxygen
and see if you can hook into its parser. I'm pretty sure it parses the
C code as well as the comments so it might do most of the work for

> Then bindings authors could write their
> own final translation utilities in their language of choice, and use
> as much or as little as they wish.
> Hopefully they'd use more rather than less.  It's to the user's
> benefit for various bindings to present reasonably consistent APIs
> while still being idiomatic, because it makes it easier to apply what
> you learned about one of them to another.

I agree to a certain extent. However, when I released the first
version of Ferret, a lot of people complained the interface was too
Java-like. It can be difficult to find the happy medium between making
the interface easy for people who used Lucy in a different language
and people who their Ruby/Perl/PHP library to work in a certain way.

But if you wanted to take this route (making it possible for binding
authors to generate some/most of the binding from some XML files), how
about using SWIG?

Dave Balmain

View raw message