The first question on your mind that why use python not other. Because there are many programming languages available today, this is the usual first question of newcomers. Given that there are roughly 1 million Python users out there at the moment, there really is no way to answer this question with complete accuracy;
the choice of development tools is sometimes based on unique constraints or personal preference.
But after teaching Python to roughly 260 groups and over 4,000 students during the
last 16 years, I have seen some common themes emerge. The primary factors cited by
Python users seem to be these:
sets it apart from other tools in the scripting world. Python code is designed to be
readable, and hence reusable and maintainable—much more so than traditional
scripting languages. The uniformity of Python code makes it easy to understand,
even if you did not write it. In addition, Python has deep support for more advanced
software reusemechanisms, such as object-oriented (OO) and function program-ming.
typed languages such as C, C++, and Java. Python code is typically one-third to
one-fifththe size of equivalent C++ or Java code. That means there is less to type,
less to debug, and less to maintain after the fact. Python programs also run imme-diately, without the lengthy compile and link steps required by some other tools,
further boosting programmer speed.
Python code between Linux and Windows, for example, is usually just a matter of
copying a script’s code between machines. Moreover, Python offers multiple op-tions for coding portable graphical user interfaces, database access programs, web-based systems, and more. Even operating system interfaces, including program launches and directory processing, are as portable in Python as they can possibly be.
as the standard library. This library supports an array of application-level pro-gramming tasks, from text pattern matching to network scripting. In addition,
Python can be extended with both homegrown libraries and a vast collection of
third-party application support software. Python’s third-party domainoffers tools
for website construction, numeric programming, serial port access, game devel-opment, and much more (see ahead for a sampling). The NumPy extension, for instance, has been described as a free and more powerful equivalent to the Matlab numeric programming system.
variety of integration mechanisms. Such integrations allow Python to be used as a
product customization and extensiontool. Today, Python code can invoke C and
C++ libraries, can be called from C and C++ programs, can integrate with Java
and .NET components, can communicate over frameworks such as COM and Sil-verlight, can interface with devices over serial ports, and can interact over networks with interfaces like SOAP, XML-RPC, and CORBA. It is not a standalone tool.
its effect on productivity is an important asset.
Of these factors, the first two (quality and productivity) are probably the most com-pelling benefits to most Python users, and merit a fuller description.
the choice of development tools is sometimes based on unique constraints or personal preference.
But after teaching Python to roughly 260 groups and over 4,000 students during the
last 16 years, I have seen some common themes emerge. The primary factors cited by
Python users seem to be these:
Software quality
For many, Python’s focus on readability, coherence, and software quality in generalsets it apart from other tools in the scripting world. Python code is designed to be
readable, and hence reusable and maintainable—much more so than traditional
scripting languages. The uniformity of Python code makes it easy to understand,
even if you did not write it. In addition, Python has deep support for more advanced
software reusemechanisms, such as object-oriented (OO) and function program-ming.
Developer productivity
Python boosts developer productivity many times beyond compiled or staticallytyped languages such as C, C++, and Java. Python code is typically one-third to
one-fifththe size of equivalent C++ or Java code. That means there is less to type,
less to debug, and less to maintain after the fact. Python programs also run imme-diately, without the lengthy compile and link steps required by some other tools,
further boosting programmer speed.
Program portability
Most Python programs run unchanged on all major computer platforms. PortingPython code between Linux and Windows, for example, is usually just a matter of
copying a script’s code between machines. Moreover, Python offers multiple op-tions for coding portable graphical user interfaces, database access programs, web-based systems, and more. Even operating system interfaces, including program launches and directory processing, are as portable in Python as they can possibly be.
Support libraries
Python comes with a large collection of prebuilt and portable functionality, knownas the standard library. This library supports an array of application-level pro-gramming tasks, from text pattern matching to network scripting. In addition,
Python can be extended with both homegrown libraries and a vast collection of
third-party application support software. Python’s third-party domainoffers tools
for website construction, numeric programming, serial port access, game devel-opment, and much more (see ahead for a sampling). The NumPy extension, for instance, has been described as a free and more powerful equivalent to the Matlab numeric programming system.
Component integration
Python scripts can easily communicate with other parts of an application, using avariety of integration mechanisms. Such integrations allow Python to be used as a
product customization and extensiontool. Today, Python code can invoke C and
C++ libraries, can be called from C and C++ programs, can integrate with Java
and .NET components, can communicate over frameworks such as COM and Sil-verlight, can interface with devices over serial ports, and can interact over networks with interfaces like SOAP, XML-RPC, and CORBA. It is not a standalone tool.
Enjoyment
Because of Python’s ease of use and built-in toolset, it can make the act of pro-gramming more pleasure than chore. Although this may be an intangible benefit,its effect on productivity is an important asset.
Of these factors, the first two (quality and productivity) are probably the most com-pelling benefits to most Python users, and merit a fuller description.
No comments:
Post a Comment