Re: Bindings for .NET languages
David Abrahams <[email protected]>
| Newsgroups | gmane.comp.lib.boost.langbinding |
|---|---|
| Message-ID | <[email protected]> |
Patrick Hartling <[email protected]> writes: > I have been trying to follow the discussions regarding the refactoring > of Boost.Python and Luabind because the issue of multi-language > interoperability ties in very heavily with my Ph.D. research. Welcome! > A lot of the discussion is way over my head right now, but I hope > that with time I'll be able to garner more information from the list > archives and from future posts. I have checked out the langbindings > branch of the Boost source tree with the intent of learning how all > the magic happens, and I am pretty sure I have a long way to go > before I'll understand the code. > > In any event, I am curious as to how the design of the new Boost > language bindings code is being generalized for languages besides > Python and Lua. From some of the early discussions back in June, I > got the impression that interpreted languages were the focus of the > work, Well, dynamically-typed languages, anyway. > and I am wondering if that is in fact the case. Does that have any > specific impact on the design Not that I know of; we're not generating any bytecode, for example. > or does it relate more to the fact that interpreted languages often > have C APIs for embedding the interpreter in natively compiled code? More likely that. Of course, the two cases we're trying to handle, Python and Lua, have a lot in common, and we haven't been looking around for additional ways to complicate... er, generalize it. > All of this boils down to an interest I have in making > native/unmanaged C++ code (relatively?) easily accessible by C# and > other .NET languages and vice versa. I really like what > Boost.Python offers in terms of exposing C++ for extension and use > by Python code, and I like what it offers in simplifying the > Python/C API. It's something I want very much to see replicated for > .NET. Does .NET have a [nasty] C API too? > For the last 8 or 9 months, I have been trying to keep track of > efforts to make C# talk to unmanaged C++ in roughly the same manner > that Python and C++ can talk via Boost.Python. Unfortunately, the > projects that held the most promise at the beginning of the year > seemed to run out of steam after only a couple of months. There is > SWIG's support for C#, but I am not sure that will meet my needs > correctly. So, I am contemplating writing something similar to > Boost.Python for .NET, though I am not yet sure how--or even if--it > will work. Has anyone here given any thought to this? Only in the most abstract sense. > There are no doubt dozens of issues, big and little, that I need to > investigate and evaluate before proceeding. Before I go too far, I > want to be sure I don't duplicate anyone else's efforts, and I want > to be sure I start from the right foundation if I do write the code > myself. If you can evaluate how similar the prolems of binding C# and C++ are to those of binding Python and C++, I think you should be able to tell whether it's worth participating in the langbinding work (and trying to get us to accomodate C#) or going off on your own. Regards, -- Dave Abrahams Boost Consulting www.boost-consulting.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf