Do we need other languages other than C and C++?

Do we need other languages other than C and C++?

大家好,又见面了,我是全栈君,祝每个程序员都可以多学几门语言。

There were hundreds of or thousands of programming languages created since the invention of computer. All these languages have the same target which is to make the computer do what we want it do. So we may find that many languages have the same functions, i.e, one task can be completed by one language can be completed by another language as well. Now we may wonder why we need so many different languages. Can we just have C or C++ since they provide the best performance we need. The answer obviously is no.

We do need other languages other than C and C++. Here are the reasons.

The creation of different languages has its own historic reasons. For example, when in 70s, the memory in a computer was limited and the CPU speed was not fast enough, to make a program workable and with an expected performance, we have to create a language which takes relative little memory and at the same time does the job we assign to it, with these reasons, we have C/C++ created. Later, the performance of CPU and the capacity of memory increased, we can achieve the same performance even with a relative slow language such as Java. Also, it’s easier to learn and can help us reduce some mistakes which made by C/C++ programmers frequently –memory leaks.

Computers have reached a point where even “slow” languages run fast enough to make the difference in speed irrelevant in many cases. We have the luxury now of sacrificing some potential performance to use a language that offers better first-class features and more powerful abstractions, which is important because it lets us get more code out the door in the same amount of time. On average, ten working but not-quite-optimized apps will do more total good than two working and really fast ones.

Most programs aren’t performance-critical. As long as the code is reasonably written, most people won’t notice the difference between something written in Python and some optimized code in C++. If you’re having performance problems and need to speed something up, the biggest gains will come from improving your data model or moving your code into a better complexity class. Only in rare cases, like search services or high-frequency trading, will removing the relatively small penalties from things like language speed actually be worth the cost.

Different languages have different use. Some languages are created for special purpose. They can provide some specified functions or libraries which are not needed in other general languages. For example, you can use MATLAB to do many things related to signal processing including audio, image etc. These audio and image processing requires a whole different set of functions. One another example is Erlang which is created with concurrency in mind. As current computer has more than one processor, we can let the computers do different things at the same time.

Make it quickly, make it great, make it fast enough to use, and ship it. Anything past that is rarely a good use of your time.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/118646.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Java之多线程断点下载的实现

    Java之多线程断点下载的实现

    2022年2月1日
    42
  • disqualification游戏_ACWING怎么样

    disqualification游戏_ACWING怎么样如下图所示,有一个 # 形的棋盘,上面有 1,2,3 三种数字各 8 个。给定 8 种操作,分别为图中的 A∼H。这些操作会按照图中字母和箭头所指明的方向,把一条长为 7 的序列循环移动 1 个单位。例如下图最左边的 # 形棋盘执行操作 A 后,会变为下图中间的 # 形棋盘,再执行操作 C 后会变成下图最右边的 # 形棋盘。给定一个初始状态,请使用最少的操作次数,使 # 形棋盘最中间的 8 个格子里的数字相同。输入格式输入包含多组测试用例。每个测试用例占一行,包含 24 个数字,表示将初始棋

    2022年8月8日
    6
  • ELK日志分析系统&Sentil插件邮件报警

    ELK日志分析系统&Sentil插件邮件报警

    2021年5月29日
    135
  • 2020最新pycharm汉化安装(亲测有效)

    2020最新pycharm汉化安装(亲测有效)这里我推荐大家使用pycharm百度输入关键词:pycharm,点击如图所示网站进入pycharm官网选择电脑系统版本,这里我们选择Windows系统,点击Community版本下的download#Professional为限时免费试用的专业版#Community为免费的社区版本我们使用社区版基本够用了,等技能熟练再去使用专业版的。双击下载好的PyCharm安装包,出现如下图所示的界面,点击“next”选择安装目录,Pycharm需要的内存较多,建议安装在D盘或者

    2022年5月16日
    56
  • 二进制、八进制、十进制、十六进制关系及转换[通俗易懂]

    二进制、八进制、十进制、十六进制关系及转换[通俗易懂]二进制,八进制,十进制,十六进制之间的关系是什么?浮点数是什么回事?本文内容参考自王达老师的《深入理解计算机网络》一书<中国水利水电出版社>一、数制解释:1、编程中经常使用的数制分类(“你编程时能使用的数制全部在这里了”):⑴、十进制十进制是我们生活中使用得最频繁的进制了。十进制的基数是10,也就是说,十进制有10个数字符

    2022年10月17日
    3
  • idea导入maven项目右侧没有maven_maven多模块和单模块的

    idea导入maven项目右侧没有maven_maven多模块和单模块的今天重装了idea,发现右边的maven,数据库模块不见了,在网上找了一些方法(如:https://blog.csdn.net/zhouyingge1104/article/details/50068919),也没解决,最后自己瞎捣鼓出来了,记录下。1.maven模块不见了,如图:2,找到右下角这个图标,如图:3,鼠标右击,出现很多菜单模块,如图:4.点击Mavenp…

    2022年10月3日
    5

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号