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


相关推荐

  • leetcode-54螺旋矩阵

    leetcode-54螺旋矩阵给你一个 m 行 n 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。示例 1:输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]输出:[1,2,3,6,9,8,7,4,5]示例 2:输入:matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]输出:[1,2,3,4,8,12,11,10,9,5,6,7]提示:m == matrix.lengthn == matrix[i].length1 <= m,

    2022年8月8日
    3
  • Java 零拷贝_java clone 深拷贝

    Java 零拷贝_java clone 深拷贝Java零拷贝参考:Java中的零拷贝零拷贝(英语:Zero-copy)技术是指计算机执行操作时,CPU不需要先将数据从某处内存复制到另一个特定区域。这种技术通常用于通过网络传输文件时节省CPU周期和内存带宽。零拷贝技术可以减少数据拷贝和共享总线操作的次数,消除传输数据在存储器之间不必要的中间拷贝次数,从而有效地提高数据传输效率零拷贝技术减少了用户进程地址空间和内核地址空间之间因为上:下文切换而带来的开销传统的IO数据读写如下的例子,Java传统IO和网络编程的一段代码Fi

    2022年9月21日
    0
  • String转换jsonobject格式错误

    String转换jsonobject格式错误String转换jsonobject格式错误开发工具与关键技术:java作者:彭浩达撰写时间:2019年7月24日publicvoidUpdataecdrud(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,I…

    2022年8月23日
    6
  • linux发起iscsi_iscsi自动连接

    linux发起iscsi_iscsi自动连接1、存储介质1)磁盘阵列:磁盘阵列是一种采用RAID技术、冗余技术和在线维护技术制造的一种高性能、高可用的磁盘存储设备。2)IP-SAN存储:SAN(StorageAreaNetwork-存储区域网络):是计算机信息处理技术中的一种架构,它将服务器和远程的计算机存储设备(如磁盘阵列、磁带库)连接起来,使得这些存储设备看起来就像是本地一样。SAN就理解成存储虚拟化,而IP-SAN就是采

    2022年8月23日
    5
  • RC低通滤波器_滤波器的基本原理

    RC低通滤波器_滤波器的基本原理先来几个不错的资源链接:1.RC滤波器截止频率在线计算器:http://www.eechina.com/tools/rc_filter_cutoff_frequency.html2.详谈一阶RC低通滤波器如何过滤高频噪声(网上不错的一个帖子)http://www.elecfans.com/instrument/631912.html3.【滤波器学习笔记】一阶RC低通滤波(下页截图来源)…

    2022年4月19日
    71
  • Python一行代码教你实现列表嵌套排序

    Python一行代码教你实现列表嵌套排序

    2021年7月14日
    109

发表回复

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

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