不要选择python作为您的第一门编程语言

Python is one of the most popular programming languages of the 21st Century. It is a general-purpose language used for Web Development, Artificial Intelligence, Machine Learning, Data Science, Mobile Application development, and some Video Games.

P ython是21世纪最受欢迎的编程语言之一。 它是用于Web开发,人工智能,机器学习,数据科学,移动应用程序开发和某些视频游戏的通用语言。

All the latest technology trends in today’s world are directly or indirectly using Python language. That is the most common reason why beginners want to learn that language.

当今世界上所有最新技术趋势都直接或间接使用Python语言。 这是初学者想要学习该语言的最常见原因。

Python —编程热点! (Python — Programming Hotshot!)

Python is a hot trend. People usually run after trends in Software Industry. I am not suggesting that Python is not a good programming language but it is kind of hyped.

Python是一个热门趋势。 人们通常追随软件行业的趋势。 我并不是说Python并不是一种好的编程语言,但是它有点夸大其词。

The best thing about Python is its simplicity and ability to do tasks with less code. You can perform a task of 10–20 lines of code in some other language with almost half the number of lines of code in Python.

关于Python的最好的事情是它的简单性和以更少的代码执行任务的能力。 您可以用某种其他语言执行10–20行代码的任务,而Python中几乎只有一半的代码行。

Even though Machine Learning and AI can be done in other programming languages, still, python is best to do so.

尽管机器学习和AI可以用其他编程语言完成,但是python仍然是最好的选择。

Python怎么了 (What’s wrong with Python)

Python is too simple. It lacks Important elements of object-oriented programming. An experienced programmer will learn Python for specific needs while having command over the OOPs concept.

Python太简单了。 它缺少面向对象编程的重要元素。 经验丰富的程序员将在掌握OOP概念的同时学习Python的特定需求。

A beginner might have to think twice before following the herd mentality in the software industry. There are plenty of reasons why a beginner should not choose Python as their first programming language —

初学者可能需要三思而后行,才能跟随软件行业的从众思想。 初学者不应选择Python作为其第一门编程语言的原因很多,

1. Python object creation does not need a Type

1. Python对象创建不需要Type

To some level, it makes coding easier. But, in my opinion, it is terrible for new programmers. They should be aware of the types of whatever objects they create, and this becomes much harder in Python language.

在某种程度上,它使编码更容易。 但是,我认为,这对于新程序员来说是可怕的。 他们应该知道他们创建的任何对象的类型,这在Python语言中变得更加困难。

2. Python lacks private class members

2. Python缺少私有类成员

The key to the OOPs concept is Encapsulation and Information hiding. A class should have its private members. But in Python, this is nearly impossible. (The pseudo-private members in Python, ‘__foo’ don’t make much sense.)

OOP概念的关键是封装信息隐藏 。 一个班级应有其私人成员。 但是在Python中,这几乎是不可能的。 ( Python中的伪私有成员'__foo'没有多大意义。 )

3. Member functions in Python are purely virtual

3. Python中的成员函数是纯虚拟的

In Python, there is no need for Interfaces. Interfaces are important for new programmers, to understand the notion of encapsulation. But in Python, writing interfaces is just not encouraged (By the language itself).

在Python中,不需要接口。 接口对于新程序员来说很重要,要了解封装的概念。 但是在Python中,只是不鼓励编写接口( 根据语言本身 )。

4. Library for almost everything

4.图书馆几乎所有东西

There are over 137,000 Python libraries present today. Libraries are a set of useful functions that eliminate the need for writing codes from scratch. This is not a good practice for someone who is new to coding as this will drastically reduce their learning curve.

今天有超过137,000个Python库 。 库是一组有用的功能,可消除从头编写代码的需求。 对于刚接触编码的人来说,这不是一个好习惯,因为这会大大降低他们的学习难度。

5. Issues with Thread

5.线程问题

The original (or official) Python implementation, CPython, has a global interpretation lock. So, there are no real concurrent threads. Furthermore, the concurrency part of code in Python is just not as strong as C++ or Java.

原始( 或官方 )Python实现CPython具有全局解释锁。 因此,没有真正的并发线程。 此外,Python中代码的并发部分不如C ++或Java强。

6. Speed is an illusion

6.速度是一种幻想

As we know Python is written in C language, so are most of its libraries. Usually, the libraries of a programming language are written in the same language but in the case of Python, most of the libraries are written in C and C++.

众所周知,Python是用C语言编写的,其大多数库也是如此。 通常,一种编程语言的库是用相同的语言编写的,但是对于Python,大多数库都是用C和C ++编写的。

7. Indentation instead of curly braces

7.缩进而不是花括号

Many developers love Python’s indentation. However, code with curly braces would be better for beginners. It provides a much clearer view and also completely differentiates the blocks of code, which is easily understandable for them.

许多开发人员喜欢Python的缩进。 但是,花括号的代码对于初学者会更好。 它提供了更清晰的视图,并且完全区分了代码块,这对于他们来说很容易理解。

def say_hello():
print("Tab") # I use tab to make indentation here
print("Space") # I use space to make indentation here Do you see the differences between tabs and spaces?

8. Dealing with Runtime Errors

8.处理运行时错误

Python is a dynamically typed language. It requires more testing and has errors that only show up at runtime due to dynamic nature. This could be really frustrating and discouraging for beginners.

Python是一种动态类型化的语言。 它需要更多的测试,并且由于动态性而导致错误仅在运行时显示。 对于初学者来说,这可能确实令人沮丧和沮丧。

9. What’s your Interest

9.您的兴趣是什么

If you are interested in becoming a mobile application or game developer then Python might not be the right technology for you!

如果您有兴趣成为移动应用程序或游戏开发人员,那么Python可能不是适合您的技术!

Python is also not memory-efficient due to its dynamic and late-binding nature. So if your application demands speed and memory efficiency then you have to look for alternatives.

由于Python具有动态和后期绑定特性,因此其内存效率也不高。 因此,如果您的应用程序要求速度和内存效率,则必须寻找替代方案。

10. Deployment and Debugging challenges

10.部署和调试挑战

One of the main issues with Python is when applications start growing, deployment becomes an issue, and also it is very difficult to debug production code for any issues.

Python的主要问题之一是应用程序开始增长时,部署成为问题,并且调试任何问题的生产代码也非常困难。

结论 (Conclusion)

If you choose Python as your first language to study, you might form some very bad coding styles (lots of public member variables, lack of interfaces, etc), and you might end up with a poor understanding of Object-Oriented Programming.

如果选择Python作为学习的第一语言,则可能会形成一些非常糟糕的编码样式(很多公共成员变量,缺少接口等),并且最终可能对面向对象编程的了解不多。

It is better to start with C++ or Java to develop a better understanding of the OOPs concept.

最好从C ++或Java开始,以更好地理解OOPs概念。

The truth is, there can never be a perfect programming language for everything.

事实是,永远不可能有适用于所有事物的完美编程语言。

Python is a good programming language, but you should consider learning it after commanding at least one Object-oriented programming language. Also, learn it if you are specifically seeking a career in Machine Learning, AI, or Data Science.

Python是一种很好的编程语言,但是您应该在命令至少一种面向对象的编程语言之后考虑学习它。 另外,如果您正在寻找机器学习,人工智能或数据科学方面的职业,请学习它。

I’m Shubham Pathania. I’m a .NET developer working in the finance domain. I find C# a great language to use, and it’s also backed by a great ecosystem. I love solving complex problems and want to continue talking about the tech I use.

我是Shubham Pathania。 我是从事金融领域工作的.NET开发人员。 我发现C#是一种很棒的语言,而且它还拥有一个强大的生态系统。 我喜欢解决复杂的问题,并希望继续谈论我使用的技术。

If you found this article helpful or thought-provoking, leave a comment, and let’s connect over LinkedIn!

如果您发现本文有帮助或发人深省,请发表评论,然后通过 LinkedIn进行联系

Here are some other articles you may enjoy:

这是您可能会喜欢的其他一些文章:

翻译自: https://medium.com/swlh/dont-choose-python-as-your-first-programming-language-bdb7a1e03946

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值