[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版

(yzsuai) #1
general C integration. And unlike Visual Basic, Python provides a cross-platform
solution, which is not controlled by a commercially vested company.

Java
Like Java, Python is a general-purpose language; supports OOP, exceptions, and
modular design; and compiles to a portable bytecode format. Unlike Java, Python’s
simple syntax and built-in datatypes make development much more rapid. Python
programs are typically one-third to one-fifth the size of the equivalent Java
program.


C/C++
Like C and C++, Python is a general-purpose language and can be used for long-
term strategic system development tasks. Unlike compiled languages in general,
Python also works well in tactical mode, as a rapid development language. Python
programs are smaller, simpler, and more flexible than those written in compiled
languages. For instance, because Python code does not constrain datatypes or sizes,
it both is more concise and can be applied in a broader range of contexts.


All of these languages (and others) have merit and unique strengths of their own—in
fact, Python borrowed most of its features from languages such as these. It’s not Py-
thon’s goal to replace every other language; different tasks require different tools, and
mixed-language development is one of Python’s main ideas. But Python’s blend of
advanced programming constructs and integration tools make it a natural choice for
the problem domains we’ve talked about in this book, and many more.


But What About That Bottleneck?


Back to our original question: how can the act of writing software be made easier? At
some level, Python is really “just another computer language.” It’s certainly true that
Python the language doesn’t represent much that’s radically new from a theoretical
point of view. So why should we be excited about Python when so many languages
have been tried already?


What makes Python of interest, and what may be its larger contribution to the devel-
opment world, is not its syntax or semantics, but its worldview: Python’s combination
of tools makes rapid development a realistic goal. In a nutshell, Python fosters rapid
development by providing features like these:



  • Fast build-cycle turnaround

  • A very high-level, object-oriented language

  • Integration facilities to enable mixed-language development


Specifically, Python attacks the software development bottleneck on four fronts, de-
scribed in the following sections.


1548 | Chapter 21: Conclusion: Python and the Development Cycle

Free download pdf