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

(yzsuai) #1

but powerful rapid development language, along with the integration tools needed to apply
it in realistic development environments.


This combination arguably makes Python unique among similar tools. For instance,
Tcl is a good integration tool but not a full-blown language; Perl is a powerful system
administration language but a weak integration tool. But Python’s marriage of a
powerful dynamic language and integration opens the door to fundamentally faster
development modes. With Python, it’s no longer necessary to choose between fast
development and fast execution.


By now, it should be clear that a single programming language can’t satisfy all our
development goals. Our needs are sometimes contradictory: the goals of efficiency and
flexibility will probably always clash. Given the high cost of making software, the choice
between development and execution speed is crucial. Although machine cycles are
cheaper than programmers, we can’t yet ignore efficiency completely.


But with a tool like Python, we don’t need to decide between the two goals at all. Just
as a carpenter wouldn’t drive a nail with a chainsaw, software engineers are now em-
powered to use the right tool for the task at hand: Python when speed of development
matters, compiled languages when efficiency dominates, and combinations of the two
when our goals are not absolute.


Moreover, we don’t have to sacrifice code reuse or rewrite exhaustively for delivery
when applying rapid development with Python. We can have our rapid development
cake and eat it too:


Figure 21-5. Prototyping with Python


On Sinking the Titanic| 1553
Free download pdf