C#, Introductory Tutorial (40) - Comparison and Suggestions of Mainstream Programming Languages C, C++, C#, Java, Go, Python

The author started to learn and apply computer programming from the poor assembly language, and has been involved in the development of commercial software, industrial software and large-scale Internet systems for decades. This article attempts to analyze C, C++, C#, Java, Go ( Golang), Python and other mainstream programming languages ​​for simple comparison, which is convenient for beginners and project party A to rationally choose the appropriate development language.

Note: There is no such thing as several generations of programming languages, only different application scenarios. Matlab (the m language in it can be regarded as a "class" programming language), SQL cannot be regarded as a programming language in the conventional sense.

Many years ago, people were loudly urged to learn C/C++ instead of Visual Basic. The effect was not good. People were more willing to trust the advice of university teachers, training teachers and popular books who could not program. But the fact is that those who learn VB were the first to be eliminated. Now loudly call everyone to learn C #, I don't know who should respond?

1 Difficult choice

Human choices and behaviors are determined by goals.

Choosing a language is like choosing a martial arts school or a handy weapon . You must consider short-term goals and long-term goals:

(1) Completion of studies or work

Once you enter the sect, you can learn whatever the BOSS (leader or Party A) says you need, and you have no autonomy.

(2) Increase the choice of future employment or job hopping

It is best to know any language. Joining the gang is the best!

In fact, on the surface, every language is similar, and it is better to be a panacea !

(3) Programming because of love (Huashan Lunjian?)

It is recommended to choose to get started with C# , and C/C++, java, python, etc. can be quickly mastered .

Therefore, this article is written for readers who aspire to become a programmer.

2 reliable suggestions

In a person's life, your surroundings are filled with all kinds of programming suggestions, most of which are unreliable and less reliable.

Which channels are more reliable for getting advice on programming languages?

(1) School teacher (head of the gang)

Not very reliable.

The teachers (the author used to be a university teacher and has some right to speak) program mainly to complete papers, publish books, do projects and evaluate titles. Most of them do not have the ability and experience to participate in the development of commercial software, just like the "Qianmen style" ——It’s fancy but not useful.” They are good teachers, but most of them are not qualified programmers.

(2) Training institutions (road buskers)

Very unreliable.

Training institutions (publishers) basically train whichever is popular, whichever is promoted, whichever is published, and concentrate on obtaining commercial benefits as soon as possible through training, counseling, publishing, videos, etc. As for whether the language is good or not, the only criterion for selection is whether it can make money.

(3) Seniors in the technical department (seniors)

This makes do. It is best to have more than 20 years of experience in the industry, and it is not necessary to find a big factory. The comprehensive ability of programmers in big factories is generally relatively poor. Those who understand architecture are not good at programming, and those who understand programming have no architecture thinking.

Leaders from small and medium-sized technical teams have the most say.

(4) The best teacher is questions and exercises

The so-called practice is what practical problem do you want to solve? What function to achieve?

Then it is endlessly implemented, perfected, upgraded and revised.

When writing this sentence, I thought of the scene of Jet Li carrying a bucket in " Shaolin Temple " .

Certainly not for the job or assignment. As long as you give up harmful games, boring TV, and mindless short videos, you will be a master of programming in a short time. Language doesn't really matter.

3 Factors of choice

3.1 On selection

人的一生 = 无数次错误的选择90% + 很多不明不白的迫不得已的选择9.5% + 极少正确的选择0.5%

理性的选择 = 方程组(各种选择因素)

感性的选择 = 抓阄(或翻硬币)

无论是理性的 或是 感性的 ,实际上都无法确认是否一定正确,更别提是不是最好的。然而,火车毕竟到站了,都得下车,下车再说吧。

最失败人的首先输在不敢选择;次之也是可悲的,是没有权力去选择;稍好的是选择了错误的选择;再稍好的是做了选择也未知结果;没有更好的了。

比好只是酒桌文化,比烂才是殊途同归的真实生活。

3.2 选择的因素

以下的文字是对于试图将编程作为生活技能而言的,理性的选择。

3.2.1 适用性(系统、性能与场景)

语言的适用性主要考虑编程能力要覆盖哪些:(1)操作系统,Windows All或指定版本?Linux什么版本?Unix?Andriod?iOS?(2)高性能需求场景或没有性能需求的场景;(3)应用模式:PC桌面应用?浏览器应用?手机或平板桌面?(4)高交互式应用,比如游戏,或低交互性应用如web服务器监控程序。

如果将语言比作武器,C/C++是佩刀——练武之人常备武器,python是飞镖——玩着热闹却杀不了人,Java/C#是剑——侠客必备的实用而飘逸之器,go是大刀——看似强大干不了很多细活,而且刀柄握在google手里。

3.2.2 生态(组件与开源)

语言生态是指可以获取的语言规范、指南、公开资料、组件与支持、技术社区的成熟度、开源代码质量与数量等等。简单地说,生态就是能够获得资料或代码的质量与数量。

生态与历史密切相关,C/C++的生态是最好的,代码与资料可信度很高;pyhton的生态也不错但大多限于AI领域,而且代码质量一般,无法工业应用;java生态很好,不过大多局限于互联网应用;C#的生态最好,其组件大多由工业化或商业化软件开发商提供,开源代码质量最高,世界上绝大多数商业化与工业化的软件及顶尖游戏都选择C#作为开发语言。

3.2.3 开发环境

编程的最终结果是可以被用户使用的产品,其核心需求无非三条:(1)好用;(2)好看;(3)稳定。

因而大家都追求好的开发环境,期望将时间更多花在算法等核心代码上。

选择具备良好开发环境的语言是明知的选择。

Visual Studio & Visual Studio Code 无疑已经是绝尘之马。

3.2.3 团队开发

团队开发的核心问题是代码可重用、低成本维护。

3.3 选择方程组

选择方程组从更细节的方面给出一写对比,供大家参考。

以下表格为作者经验与一面之词而已。

3.3.1 按软件的系统层级

3.3.2 按操作系统

3.3.3 按用户角色

3.3.4 团队开发适应性

3.3.5 按语言生态

3.3.6 按开发环境

理性选择未必是最佳选择,因为世界上没有最佳选择,选就是了。

Guess you like

Origin blog.csdn.net/beijinghorn/article/details/128933465