[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C/C++ bindings: automated or by hand?
- From: "Thomas Breuel" <tmbdev@...>
- Date: Mon, 10 Sep 2007 10:29:12 -0700
All third-party APIs I've
bound to Lua (for example win32, libpng, freetype, opengl, ode, fuse,
etc.) were so different from each other that each time I had to take a
different binding style.
That's a difference between C and C++.
There is a great variety in styles in C because C doesn't standardize a lot of things. In C++, virtual functions, memory management, exceptions, and overloading have standardized representations, and there are natural bindings for it. That's why tools like tolua can generate high quality bindings for C++ almost automatically, while they can't do the same for C.