【SparkData 博客文章】 A Brief Summary of Advantages and Dr

d
dido2009
楼主 (未名空间)

【 以下文字转载自 Statistics 讨论区 】
发信人: dido2009 (music fan), 信区: Statistics
标 题: 【SparkData 博客文章】 A Brief Summary of Advantages and Drawbacks of Python
发信站: BBS 未名空间站 (Fri Nov 13 11:30:53 2020, 美东)

Python is the most popular programming language nowadays. Based on my own
experience, here is a list of advantages and limitations/drawbacks of Python:

Advantages:

1. Easy to learn: Simplicity makes the learning curve of Python is low.
Basically one can pick it up from a few days to a few weeks.

2. Versatile: Python code can be found almost everywhere, such as web
applications, desktop applications, data science, big data, spark, cloud,
etc.

3. Flexible: Flexible syntax makes its code easy to write.

4. Python is a hybrid of several programming language types. It supports
Object-oriented programming, Procedural programming, and Functional
programming.

5. Generator is a very useful feature.

6. Python has a comprehensive ecosystem, supporting community, extensive
libraries, and 3rd party modules.

Limitations or Drawbacks:

1. Some syntax brings inconvenience when writing code or even makes its code error-prone. Example A: Python code uses indentation to define scope,
instead of brackets. Example B: If you want to call a function, the
definition of the function must be defined before the caller, otherwise the function cannot be found.

2. Python is interpreted instead of compiled. You may modify code on-the-fly, but the result may be not what you expected, as the old code is cached.

3. Python is not strongly typed language. Type is determined at run-time
only. Thus it is not type-safe before running.

4. As an interpreted programming language, Python’s performance is not as
good as compiled ones, such as C-family languages (C, C++, Java, C#, etc.). Usually it is slower.

5. By design, there is no explicit pass-by-reference parameter. Although
there are some mechanisms to mimic pass-by-reference implicitly, for example, use dictionary as a parameter. Such implicit pass-by-reference behavior
may confuse people. People need to be very clear what data type is pass-by-
value, and what data type is pass-by-reference.

6. If you want to write multi-threading code, probably Python is not a good choice for it.

===================================
有空来坐坐,SparkData 欢迎您!
http://www.sparkdata.ca

入门介绍,行业科普
技术讨论,技能培训
职业规划,工作信息
====================================