2010/11/25 Tom Lippincott <thomas.lippinc...@cl.cam.ac.uk>:
> I think SWIG could also be used to generate the "l_*.cc" files, or "fill
> them in" automatically (see below for the issue of controlling what gets
> exposed).

I would be interested to see how much cleaner this made the code.  I
think the l_*.cc files are kind of messy, but most functions are often
either heavily macroified or quite custom, and in neither of those
cases SWIG would make much of a simplification.

> When building a Python API, I had to be selective about which structures
> were exposed: some header files caused errors that would have taken a
> longer effort to track down and fix.  For the most part, you can simply
> take a header file and declare which structures you want the API to
> expose (and you get an arbitrary level of control beyond this), so its
> easy to distinguish between, say, user-accessible info and internals.

Also, I can't think of many classes that need exposing to Lua at this
point. Do you have any example of what you might consider? Given my
own experience exposing Crawl code to Lua, it felt like 95% C++
refactoring and maybe 5% Lua glue.


In both these cases of refactoring old APIs and generating new APIs, I
suspect that an example patch would make for a far more constructive
discussion.  It's always more productive to talk about what's been
done than to navel-gaze about what might be done.

Regards,
-enne

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Crawl-ref-discuss mailing list
Crawl-ref-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss

Reply via email to