Which language is best, C, C++, Python or Java?什么编程语言最好
Either you fuck the life or the life fucks you.
转载自 quora
大致翻译一下,不喜勿喷,谢谢支持!以下是内容:
I have used each of them for 15-20+ years. There is no best. They have different strengths and weaknesses.
这些我都用了15到20多年,没有最好的,只是各自有各自的优缺点。
- C and C++ require a lot of discipline because you have to do memory management yourself.
C和C++需要编程人员有很好的自制力,因为它们需要我们自己进行内存管理。 - C++ is extremely powerful but also very complex.
C++非常的强大,但是很复杂。 - C and C++ are "dangerous" because, if you are not careful, your program can access and modify data that it is not supposed to touch.
C和C++很“危险”,因为一不小心,你的程序就会修改你不希望被修改的数据。 - Python is elegant and designed to be easy to use and read. It has the least distractions when it comes to syntax.
Python很优雅,并且易用易读,不用为语法的事情烦心。 - The syntax of C, C++ and Java look somewhat similar. Python looks different, it uses indentation instead of {} to group code.
C C++和Java看起来类似,但是python却不同,因为python使用缩进而不是{} - Python comes with "batteries includes", that means it has a lot of functionality build-in in the standard library.
python内置电池,也就是说在python的标准库中有很多的内置函数。 - In Python there is 'one way to solve a problem'. On the other end, in C++ there are way more ways to solve the same problem. This added choice can distract you form solving the problem.
解决问题,python只有一种方法,但是C++会有多种方法,多的方法只会干扰你解决问题 - Java has the best IDE support (e.g. eclipse or IntelliJ)
Java有最好的IDE支持(例如:eclipse或者IntelliJ) - C and C++ are also statically typed, but the preprocessor can add a level of complexity that can make it difficult to be sure what actually happens.
C与C++是静态类语言,预处理器会增加程序的复杂程度。 - In terms of speed C/C++ are fastest, but for most problems Java is very close in speed. Python can be slow, but if needed critical parts can be written in C. On modern execution speed is rarely the limit - cache behaviour, memory and disc access are the limits.
总的来说,C与C++是最快的,但对大多数问题来说,Java也差不离。python相对就慢些,但如果需要有些重要的部分可以用C进行编写。现在执行速度不是什么限制,-缓存,内存 硬盘才是限制。
If you want to learn programming, I would learn python first, then Java, then C and finally C++.
如果你想学习编程,我会首先学习python,然后Java,C,最后是C++。I personally would not recommend C++ because of its complexity. However, if your are disciplined and have a strict set of rules for a project, C++ can be fantastic.
就我个人而言,因为C++的复杂性,我不会推荐它,如果你非常有纪律性,并且很严格,那么C++可以带你飞。I would use C only for low level stuff, like writing device drivers.
我会用C来写底层的东西,比如设备的驱动。Java is good for large projects, provided you write good APIs and you are carefully modularizing your software.
Java对于大项目来说的是极好的,有很好的APIs,你要很小心的模块化你的软件。(将就着看看,如果有不同意见可以留言。)Python is good for small projects. If the team and the software gets bigger, it can become hard to maintain unless you have a very good test coverage.
小项目使用python很棒,如果团队与软件变得庞大,那就会很难维护了,除非有很好的测试覆盖率。
Which language is best, C, C++, Python or Java?什么编程语言最好的更多相关文章
- Golang、Php、Python、Java基于Thrift0.9.1实现跨语言调用
目录: 一.什么是Thrift? 1) Thrift内部框架一瞥 2) 支持的数据传输格式.数据传输方式和服务模型 3) Thrift IDL 二.Thrift的官方网站在哪里? 三.在哪里下载?需要 ...
- 将来会是Python、Java、Golang三足鼎立的局面吗?
甲:听说最近java跌落神坛,python称霸武林了,你知道吗? 乙:不是吧,我前几天看python怎么还是第三? 丙:你们都在扯蛋,python在2018年就已经是最好的语言了! 乙:不可能吧? 甲 ...
- 『Python基础-1 』 编程语言Python的基础背景知识
#『Python基础-1 』 编程语言Python的基础背景知识 目录: 1.编程语言 1.1 什么是编程语言 1.2 编程语言的种类 1.3 常见的编程语言 1.4 编译型语言和解释型语言的对比 2 ...
- python和java,php,c,c#,c++的对比
1.C语言,它既有高级语言的特点,又具有汇编语言的特点,它是结构式语言.C语言应用指针:可以直接进行靠近硬件的操作,但是C的指针操作不做保护,也给它带来了很多不安全的因素.C++在这方面做了改进,在保 ...
- Python和Java、PHP、C、C#、C++等其他语言的对比?
1111 1.C语言,它既有高级语言的特点,又具有汇编语言的特点,它是结构式语言.C语言应用指针:可以直接进行靠近硬件的操作,但是C的指针操作不做保护,也给它带来了很多不安全的因素.C++在这方面做了 ...
- paip.判断文件是否存在uapi python php java c#
paip.判断文件是否存在uapi python php java c# ==========uapi file_exists exists() 面向对象风格: File.Exists 作者: 老哇 ...
- paip.web数据绑定 下拉框的api设计 选择框 uapi python .net java swing jsf总结
paip.web数据绑定 下拉框的api设计 选择框 uapi python .net java swing jsf总结 ====总结: 数据绑定下拉框,Uapi 1.最好的是默认绑定..Map(k ...
- MongoDB的账户与权限管理及在Python与Java中的登陆
本文主要介绍了MongoDB的账户新建,权限管理(简单的),以及在Python,Java和默认客户端中的登陆. 默认的MongoDB是没有账户权限管理的,也就是说,不需要密码即可登陆,即可拥有读写的权 ...
- [译]Python作为一种编程语言有多强大?
Quora上有个问题:Python作为一种编程语言有多强大? 以下是Patrycja Okowicka的回答 说实话,Python是一门强大的语言,几乎所有东西都可以用Python创建!这就是为什么它 ...
随机推荐
- DDD实践切入点(一)
前两篇:大型系统的支撑,应用系统开发思想的变迁 之前大致说了使用DDD的前期准备,现在可以真正开始实践了,以我刚刚结束的一个简单的经典DDD方式的项目为例子,当然由于比较简单,所以很多时候会脱离它来介 ...
- Microsoft Build 2016 Day 1 记录
去年今日:Microsoft Build 2015 汇总 今年的 Bulid 时间是 3.30-4.1,第一天的主角主要是 Windows 10.人工智能.HoloLens.小娜等,详细介绍:3 分钟 ...
- SQL实用
实用的SQL语句 行列互转 create table test(id int,name varchar(20),quarter int,profile int) insert into test ...
- Python笔记之不可不练
如果您已经有了一定的Python编程基础,那么本文就是为您的编程能力锦上添花,如果您刚刚开始对Python有一点点兴趣,不怕,Python的重点基础知识已经总结在博文<Python笔记之不可不知 ...
- 自己封装了一个EF的上下文类.,分享一下,顺便求大神指点
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using ...
- DDD及相关概念
领域:指一个具体的应用范围,比如电商.订票管理.会议管理等,实现某一领域的功能,与其对应的商业领域一致.譬如Contoso会议管理系统从两个方面来阐述(1)系统概览:销售会议座位.创建新会议[领域的活 ...
- 抽象类 VS 接口
引言 接口和抽象类是面向对象编程(OOP, Object Oriented programming)中两个绕不开的概念,二者相似而又有所不同.接下来,我们来了解二者的概念并比较它们的异同. 什么是抽象 ...
- Effective前端1:能使用html/css解决的问题就不要使用JS
div{display:table-cell;vertical-align:middle}#crayon-theme-info .content *{float:left}#crayon-theme- ...
- EF(Entity Framework)系统学习系列
好久没写博客了,继续开启霸屏模式,好了,废话不多说,这次准备重新系统学一下EF,一个偶然的机会找到了一个学习EF的网站(http://www.entityframeworktutorial.net/) ...
- 04实现累加和计算功能并且实现textbox不允许输入数字以外的字符但不包括退格键同时不允许第一个数值为0
private void button1_Click(object sender, EventArgs e) { double number1, number2; if (double.TryPars ...