C ++是一种面向对象的语言吗? [英] Is C++ an Object Oriented language?

查看:417
本文介绍了C ++是一种面向对象的语言吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直听说C ++不是面向对象,而是C与类。所以,当我提到一个采访者C ++不是真正面向对象,他问我为什么我不认为它是一个OO语言。我自大学以来没有做任何C ++,我没有太多的答案。是C ++面向对象还是不是?为什么?

I have always heard that C++ is not Object Oriented but rather "C with Classes". So, when I mentioned to an interviewer that C++ was not really object oriented, he asked me why I didn't consider it an OO language. I haven't done any C++ since University, and I didn't have much of an answer. Is C++ Object Oriented or not? and why?

推荐答案

C ++通常被视为多范式语言。也就是说,你可以使用它面向对象,程序,甚至函数式编程。

C++ is usually considered a "multi-paradigm" language. That is, you can use it for object-oriented, procedural, and even functional programming.

那些拒绝C ++是OO的人通常有牛肉,原始类型不是对象本身。按照这个标准,Java也不会被认为是OO。

Those who would deny that C++ is OO generally have beef with the fact that the primitive types are not objects themselves. By this standard, Java would also not be considered OO.

当然,C ++不像Smalltalk,Ruby,Self等那样是OO。但是它绝对是大多数标准的有效的OO语言。

It is certainly true that C++ isn't OO to the same extent as Smalltalk, Ruby, Self, etc. are, but it is definitely an effective OO language by most standards.

这篇关于C ++是一种面向对象的语言吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆