lua-users home
lua-l archive

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


On Wed, 2003-04-09 at 09:40, Thomas Andersen wrote:
> Also I see no special benefits in compiling the lua libraries as C++ code..
> but even if there was a benefit, lua could still be compiled as C++ code,
> but with external C binding.

I will give you a practical example that we have encountered:

If you use exceptions in your code, you may have/want to compile lua
with C++.

We use 4.0 in our project,  and for a series of reasons that I don't
really know/remember (Christian would have to step in and explain it),
we patched tolua to do the the exception handling, keeping lua as a C
library.

One of the problems with that is code bloating: every tolua binding has
a try/catch pair,  since the exception information would be lost in the
C library.  

Other people might give you other reasons to compile it in C++...

Just to show you that this is not really some no-brainer issue.

Siome
-- 
Siome Klein Goldenstein
siome@cs.rutgers.edu
http://www.cs.rutgers.edu/~siome