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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Pytest(1)安装与入门[通俗易懂]

    Pytest(1)安装与入门[通俗易懂]pytest介绍pytest是python的一种单元测试框架,与python自带的unittest测试框架类似,但是比unittest框架使用起来更简洁,效率更高。根据pytest的官方网站介绍,它

    2022年7月29日
    7
  • kettle工具使用教程

    kettle工具使用教程kettle工具使用教程Kettle简介Kettle是一款国外开源的ETL工具,纯java编写,可以在Window、Linux、Unix上运行,数据抽取高效稳定。Kettle中文名称叫水壶,该项目的主程序员MATT希望把各种数据放到一个壶里,然后以一种指定的格式流出。Kettle这个ETL工具集,它允许你管理来自不同数据库的数据,通过提供一个图形化的用户环境来描述你想做什么,而不是你想怎么…

    2022年10月16日
    4
  • python aic准则_使用AIC进行变量选择并评估多元回归中的标准

    python aic准则_使用AIC进行变量选择并评估多元回归中的标准#MultipleRegressionVariableSelectiondefmr(selection=False):importosos.chdir(r’C:\Users\Path’)importpandasaspdh=pd.read_csv(‘Dataset.csv’,index_col=0)#print(h.head(0))#dataset’svariablenamesyva…

    2022年5月23日
    57
  • 一级域名、二级域名 cookie

    一级域名、二级域名 cookie一级域名、二级域名一级域名是animail.com二级域名是www.animal.com,elephant.animal.com三级域名是small.elephant.animal.com以此类推…cookie在父子域名下的行为在子域名下,可以提交父域名的cookie

    2022年5月21日
    91
  • ansible 学习笔记

    ansible 学习笔记

    2022年3月1日
    42
  • xmind使用指南(XMind具有下列哪些功能)

    ..6年的工作利用思维导图只需要6个月就可以轻松完成了?据美国波音飞机设计人员透露,他们按照传统方法设计一架飞机大概要花费6到7年的时间。然而当他们引入思维导图工具后,设计时间大大缩短,原本需要花费6年时间的工作居然6个月就提前完成了,不但如此,还大大为公司节省了数千万美元的费用。傲看今朝图片来自网络由此可见,思维导图是一个非常高效强大、实用的思维工具。目前世界500强包括惠普、…

    2022年4月15日
    137

发表回复

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

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