wiki:Langbinding

Version 2 (modified by René Rivera, 15 years ago) ( diff )

--

Langbinding

In thinking about how to design, and implement the various aspect of Langbinding I kept going back to some of the same concepts that make up the Common Lisp MOP class system. The key goal for Langbinding is to describe types, and interfaces for those types, as data structures. Unlike the Lisp MOP the interfaces can't be dynamic in the same way in C/C++, but at minimum we can create ad hoc descriptions but only to static code. The goal being to create a bridge between dynamic languages and C++. The basic components of such a bridge are:

  • A description the interfaces and data, the binding.
  • An instance of the binding for a particular language.

Core

The core components define the language independent aspects of implementing the binding interfaces.

  • Plugin registration
    • Registry of the plugins implementing individual bindings.
  • Type registration
    • Registry of all the types, and their relationships, in the plugins.
  • Type conversion
    • Algorithms for implicit conversion of registered types.
  • Signature matching
    • Matches a given source call to an available target call.
  • Exception translation
    • Registration of exception handlers to translate exceptions as they transition between languages.
Note: See TracWiki for help on using the wiki.