python 光标消失

In the last few months, a lot of people started talking about how Python would be going away in favor of other, newer programming languages like Julia, Rust, Go, etc. However, I want to discuss what the data actually shows and I’ll let you reach your own conclusions.

在过去的几个月中,许多人开始谈论Python将会如何发展而取而代之的是其他更新的编程语言,例如Julia,Rust,Go等。但是,我想讨论一下数据实际显示的内容,让您得出自己的结论。

Let’s get started with some of the arguments against Python.

让我们从反对Python的一些论点开始。

Python有什么问题 (What’s Wrong With Python)

There are a number of arguments against Python and how other languages are filling that gap or resolving some of the issues. Let’s see some of the arguments against Python.

有很多反对Python的论据,以及其他语言如何填补这一空白或解决某些问题。 让我们看看一些反对Python的论点。

速度 (Speed)

Python is slow. It is well known that Python can’t perform side by side against programming languages like C++, Go, or Rust (among others), but sometimes speed is not everything. Python may not be the fastest programming language, but with the right setups, libraries, and coding, it can support wild volumes and process huge amounts of data. Don’t be obsessed with raw speed. Most of the time, you won’t need it. Moreover, the simplicity of Python and availability of developers may well compensate for the lack of speed.

Python很 。 众所周知,Python不能与C ++,Go或Rust(以及其他)之类的编程语言并行执行,但有时速度并不是全部。 Python可能不是最快的编程语言,但是通过正确的设置,库和编码,它可以支持大量数据并处理大量数据。 不要沉迷于原始速度。 大多数时候,您将不需要它。 而且,Python的简单性和开发人员的可用性可以很好地弥补速度的不足。

种类 (Types)

Even though Python supports types with Python 3.6 — Typings, it is also true that while you can annotate a variable with a type to have better code completion on your IDE, Python would still handle that variable with dynamic typing without performing any validation. If you want to have type validation, you are required to do it yourself — or even better, use a Python library like Pydantic.

即使Python支持使用Python 3.6的类型— Typings ,也可以使用类型注释变量,以在IDE上更好地完成代码,但Python仍将使用动态类型处理该变量,而无需执行任何验证。 如果要进行类型验证,则需要自己进行验证-甚至更好,请使用Pydantic之类的Python库。

There are good frameworks using Python types, like FastAPI, which we covered in a previous article.

有一些使用Python类型的良好框架,例如FastAPI,我们在上一篇文章中已经介绍过 。

老了 (It’s old)

I can’t believe this is an actual argument, but it seems like it is. Yes, Python is from the ‘90s and has a few more years under its belt than some of its competitors, but it is still pretty solid. Over time, it has not only turned out to be a great programming language but also built a great community, a huge library repository, and much more. There are problems that date back to what was considered a best practice back then, but they aren’t significant issues anymore. Being old in and of itself is not a disadvantage.

我不敢相信这是一个实际的论点,但看起来确实如此。 是的,Python起源于90年代,比其一些竞争对手有几年的发展历史,但是它仍然非常可靠。 随着时间的流逝,它不仅被证明是一种很棒的编程语言,而且还建立了一个很棒的社区,一个庞大的图书馆资源库等等。 有些问题可以追溯到当时的最佳实践,但现在不再是重要问题。 变老本身并不是一个缺点。

救援数据 (The Data to the Rescue)

In order to understand why I believe Python is not going away anytime soon, we will focus on data — impartial (maybe), simple, old-fashioned data.

为了理解为什么我相信Python不会很快消失,我们将重点关注数据-公正(也许),简单,老式的数据。

2020年开发者生态系统状况 (The State of Developer Ecosystem 2020)

We will start by reviewing a recent report from Jetbrains in which they “combined results of the fourth annual Developer Ecosystem Survey with the feedback from 19,696 developers whom they surveyed in the beginning of 2020 to identify the latest trends around tools, technologies, programming languages, and many other exciting facets of the development world.”

我们将首先回顾Jetbrains 的最新报告 ,其中“他们将第四次年度开发者生态系统调查的结果与2020年初调查的19,696名开发人员的反馈相结合,以确定围绕工具,技术,编程语言,以及其他许多激动人心的方面。”

The first relevant question in the survey is “What are your primary programming languages?” Python sits in third place right after JavaScript and Java. But if we look at the next question (“Do you plan to adopt or migrate to other languages in the next 12 months? If so, to which ones?”), we can see many Java developers planning to learn or migrate to Python. So Python’s adoption is actually growing and not shrinking.

调查中的第一个相关问题是“您的主要编程语言是什么?” Python在JavaScript和Java之后排在第三位。 但是,如果我们看下一个问题(“您打算在未来12个月内采用还是迁移到其他语言?如果是,请迁移到哪种语言?”),我们可以看到许多Java开发人员计划学习或迁移到Python。 因此,Python的采用实际上正在增长,而不是在缩小。

JetBrains survey 2020 — primary programming languages.
JetBrains 2020年调查—主要编程语言。

The survey has other very interesting sections that are beyond the scope of this article, so I recommend you read it in full. Or you can just read the Python section where they talk about IDEs, what Python is being used for, and other interesting stuff.

该调查还有其他非常有趣的部分,不在本文的讨论范围之内,因此,我建议您完整阅读它。 或者,您也可以阅读Python一节 ,其中讨论了IDE,Python的用途以及其他有趣的内容。

StackOverflow 2020开发人员调查 (StackOverflow 2020 Developer Survey)

This is probably the biggest and most important development survey out there. It has a ton of insightful questions, but let’s see what developers are saying about programming languages and Python in particular.

这可能是最大,最重要的发展调查 。 它有很多有见地的问题,但让我们看看开发人员对编程语言特别是Python的看法。

In the report, one of the metrics is the popularity of technology, with the results being:

在报告中,指标之一是技术的普及程度,其结果是:

StackOverflow Developer Survey 2020 — most popular programming languages.
StackOverflow开发人员调查报告2020-最受欢迎的编程语言。

Python is in fourth place behind JavaScript, HTML/CSS, and SQL. If we focus only on programming languages, it would be second right above Java, which is different compared to the previous survey. However, we can still see the trend of people jumping to Python over Java.

Python在JavaScript,HTML / CSS和SQL之后排在第四位。 如果我们只关注编程语言,那将排在Java之后,仅次于Java,与之前的调查相比有所不同。 但是,我们仍然可以看到人们倾向于使用Java而不是Python的趋势。

Now things get interesting. One popular section of the survey is “Most Loved, Dreaded, and Wanted Languages.” Let’s see how Python fares in each of these categories:

现在事情变得有趣了。 该调查的一个热门部分是“最受欢迎,最害怕和想要的语言”。 让我们看看Python在这些类别中的表现如何:

StackOverflow Developer Survey 2020 — most loved programming languages.
StackOverflow开发人员调查报告2020-最喜欢的编程语言。
StackOverflow Developer Survey 2020 — most wanted programming languages.
StackOverflow开发人员调查报告2020-最需要的编程语言。

Again, Python is at the top as the third-most loved programming language behind Rust and TypeScript and the most wanted programming language.

同样,Python是仅次于Rust和TypeScript以及最受欢迎的编程语言的第三大最受欢迎的编程语言。

This survey is fantastic and deserves a full read if you haven’t given it one already.

这项调查非常棒,如果您还没有阅读过,则应该阅读全文。

结论 (Conclusion)

Python has its flaws: Speed, kind of old, old concepts. With that said, it is still a major player, clearly a top contender, and widely used in a variety of projects from web development to IoT and data science.

Python有其缺陷:速度,一种古老的概念。 话虽如此,它仍然是主要参与者,显然是顶级竞争者,并且广泛用于从Web开发到IoT和数据科学的各种项目中 。

After seeing the numbers, I understand that Python is not going away anytime soon. There will probably be a time when this may be different, but Python is a language still worth learning, exploring, and mastering.

看到这些数字后,我知道Python不会很快消失。 可能有时会有所不同,但是Python是仍然值得学习,探索和掌握的语言。

Thanks for reading!

谢谢阅读!

翻译自: https://medium/better-programming/dont-worry-python-isn-t-going-away-1237d6c46f01

python 光标消失

更多推荐

python 光标消失_别担心,Python不会消失