Hybrid Development
Despite the basic differences in approach between C++ and dynamic languages (such as Lua, Perl, and Python), they complement one another surprisingly well. The efficiency and strict typechecking of C++ allow expert programmers to build super-fast core components with strong correctness safeguards. However, the cost of linking large programs can impede prototyping, integration, and testing to the point where it becomes a major drag on the development cycle. Dynamic languages usually do not run as fast, but their flexibility and immediacy makes them ideal for assembling large applications out of well-defined components. Also, languages like Python are much more forgiving than C++, allowing safe usage and easy experimentation even by non-programming-experts.
In a hybrid development model, performance-critical components are written in C++ and a dynamic language is used to integrate them into larger systems. High-level C++ libraries are presented as separate, dynamically-loaded Python modules. This organization eliminates whole-program linking, and tends to limit recompilation dependencies. Because dynamic languages are so resilient, this model allows domain experts who are not strong C++ programmers to quickly experiment, prototype, and test, without fear of crashes or compilation errors.
Once upon a time it was very difficult to smoothly bridge the gap between C++ and dynamic languages, because the low-level C-language APIs provided by these languages provided only weak abstractions. As a result, bindings to C++ were usually inelegant. Worse, they often exposed the possibility of crashes when misused from the dynamic side, which violates a baseline user expectation (even if those dangers are de rigeur for C++ programmers).
Today, advanced binding libraries such as Boost.Python and Luabind have changed all that: we can accurately, safely, and idiomatically “reflect” C++ interfaces into dynamic languages (and vice-versa). Code can be easily pushed across the static/dynamic boundary, in either direction, even as a project evolves. Our associates (among them the authors of Boost.Python and Luabind) are all fluent in the principles of hybrid development; we can help you create an architecture that is flexible, safe, efficient, and that engenders real coding momentum.