complex programs, yet because they’re provided in simple ways, they do not interfere
with the problem we’re trying to solve.
Python Fosters Hybrid Applications
As we’ve seen earlier in this book, Python’s extending and embedding support makes
it useful in mixed-language systems. Without good integration facilities, even the best
rapid-development language is a “closed box” and is not generally useful in modern
development environments. But Python’s integration tools make it usable in hybrid,
multicomponent applications. As one consequence, systems can simultaneously utilize
the strengths of Python for rapid development and of traditional languages such as C
for rapid execution.
While it’s possible and common to use Python as a standalone tool, it doesn’t impose
this mode. Instead, Python encourages an integrated approach to application devel-
opment. By supporting arbitrary mixtures of Python and traditional languages, Python
fosters a spectrum of development paradigms, ranging from pure prototyping to pure
efficiency. Figure 21-3 shows the abstract case.
Figure 21-3. The development mode “slider”
As we move to the left extreme of the spectrum, we optimize speed of development.
Moving to the right side optimizes speed of execution. And somewhere in between is
an optimum mix for any given project. With Python, not only can we pick the proper
mix for our project, but we can also later move the RAD slider in the picture arbitrarily
as our needs change:
Going to the right
Projects can be started on the left end of the scale in Python and gradually moved
toward the right, module by module, as needed to optimize performance for
delivery.
Going to the left
Similarly, we can move strategic parts of existing C or C++ applications on the
right end of the scale to Python, to support end-user programming and customi-
zation on the left end of the scale.
This flexibility of development modes is crucial in realistic environments. Python is
optimized for speed of development, but that alone isn’t always enough. By themselves,
But What About That Bottleneck?| 1551