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.

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • linux如何删除tree命令,误删tree命令如何恢复

    linux如何删除tree命令,误删tree命令如何恢复误删tree命令如何恢复考察rpm,yum的用法一、删除tree命令,tree命令不可用[root@centos7~]#whichtree/usr/bin/tree[root@centos7~]#rm-f/usr/bin/tree[root@centos7~]#tree.bash:tree:commandnotfound…二、直接yum或rpm安装将提示tree已经…

  • web服务交互中HTTP数据内容GZIP,ZLIB格式压缩与解压缩封装(共享)

    web服务交互中HTTP数据内容GZIP,ZLIB格式压缩与解压缩封装(共享)

  • linux tomcat 安装教程,Linux安装配置Tomcat教程

    linux tomcat 安装教程,Linux安装配置Tomcat教程本文为你们分享了Linux安装配置Tomcat,供各位参考,具体内容如下1、下载tomcatLinux版本oracle官网下载地址:百度云盘链接:密码:5inw2、在usr目录下新建tomcat目录,然后将下载的tomcat用软件拷贝到这个新建的tomcat目录中3、解压tomcat文件由于文件名有点长,我们应该给解压后的文件夹重命名,以便下面引用方便4、配置环境变…

  • 欢欣雀跃还是欢呼雀跃_极空间 docker

    欢欣雀跃还是欢呼雀跃_极空间 dockerAnaconda清华镜像已经恢复使用!目录1.Anaconda清华源终于活了!2.配置命令:2.1添加清华anaconda镜像:2.1Conda附加库:conda-forgemsys2biocondamenpopytorch1.Anaconda清华源终于活了!2.配置命令:2.1添加清华anaconda镜像:condaconfig–addchannelsh…

    2022年10月26日
  • ping和traceroute的工作原理

    ping和traceroute的工作原理PING原理PING是基于ICMP协议(网络层)工作的ICMP:InternetControlMessageProtocol,互联网控制报文协议ICMP用于报告传输过程中出现的问题,比如确认IP包是否成功送达,或者发送过程中被废弃的原因比如主机A向主机B发送消息,在途径某个路由器时,无法发现B的存在。路由器就会向A发送一个ICMP不可达的数据包,A解析ICMP的首部和数据段得知具体信息ICMP报文封装在IP包里,从左到右依次是IP头、ICMP头、ICMP数据段,后两部分构成IP

  • 跳频介绍_跳频功能

    跳频介绍_跳频功能跳频是最常用的扩频方式之一,其工作原理是指收发双方传输信号的载波频率按照预定规律进行离散变化的通信方式,也就是说,通信中使用的载波频率受伪随机变化码的控制而随机跳变。从通信技术的实现方式来说,“跳频”是一种用码序列进行多频频移键控的通信方式,也是一种码控载频跳变的通信系统。从时域上来看,跳频信号是一个多频率的频移键控信号;从频域上来看,跳频信号的频谱是一个在很宽频带上以不等间隔随机跳变的。其中:跳

    2022年10月23日

发表回复

您的电子邮箱地址不会被公开。

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