Great question. The short answer is, "because I didn't really look good enough at boost::python first." The long answer is that we really are doing something different than anyone else has. ChaiScript was developed specifically to work with C++, and it built around C++'s needs. At no point do we have to shoehorn C++ to fit into a preexisting language, like python or lua.Berserker wrote: 1) Why did you implement a custom api instead of the "common" boost one (boost::python or luabind)?
Looking closer at boost::python now, I see that would certainly could do many things like they are, and even discussed similar things early on, but it ended up being unnecessary because it was more verbose than ChaiScript needed.
It certainly would be possible to match the form of boost::python, if it would make a big difference in usability for some people.
We could easily write a sort of pre-processor for chaiscript that would dump some module code from a .hpp file, I would think. The goal of chaiscript was to make it straightforward enough that a preprocessor would be unnecessary, but I could see the utility in something that just helped you bootstrap the process.Berserker wrote: 2) Are you going to support an "autowrapper"? I mean something like Py++. In my experience of embedding scripting engines (spydermonkey, python, lua ecc..), the most tedious part is when I have to expose my C/C++ library: at the moment I'm trying to automate this process using Py++ but with a lot of problems (mostly related to the CPython's GIL, you can read some posts of mine in the Py++ mailing list) .
I'm always interested in looking at new scripting engines because I didn't found the "perfect" solution for me yet
IMO for anything less than 20 functions/types the bootstrapping would just get in the way, because you would then have to hand pick which methods you wanted to forbid the script from using. I'll add this idea to our bug tracker and see if we can follow up on it.
