📜  C++ 和 Go 的区别

📅  最后修改于: 2021-09-13 02:29:04             🧑  作者: Mango

1. C++:
C++ 由贝尔实验室的 Bjarne Stroustrup 于 1979 年开发,作为 C 语言的扩展 C++ 是一种通用编程语言,现在广泛用于竞争性编程。它具有命令式、面向对象和通用编程功能。 C++ 因其高效、高速和动态内存利用而在编码人员中广受欢迎。它运行在各种平台上,如 Windows、Linux、Unix、Mac 等。

2. 去:
Go 由 Robert Griesemer、Rob Pike 和 Ken Thompson 于 2007 年在 Google 设计,目的是在多核、联网机器和大型代码库时代提高编程效率。设计人员希望解决对 Google 使用的其他语言的批评,它是一种开源编程语言,可以轻松构建简单、可靠和高效的软件。它通常被称为“Golang”,因为它的域名是 golang.org,但正确的名称是 Go。

C++ 和 Go 的区别:

S.No. C++ GO
1. It is an object oriented programming language. It is a procedural programming language.
2. It uses true, false and bool. It has logical operators instead of boolean.
3. It has support for inheritance. It has no support for inheritance.
4. It has support for class with constructors. It has no support for class with constructors.
5. It has do-while and while statements. It has no do-while or while statements.
6. It supports function overloading. It has no support for function overloading.
7. It is open source project 2.0. It is licensed under the BSD license.
8. It support Parametric polymorphism which is checked at compile time. It does not support Polymorphism.