C ++:4范式? [英] C++: 4 paradigms?

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

问题描述

我已经仔细阅读了常见问题解答,发现了一些范式,但是我没有真正找到

回答我的问题。


C ++是一种4范式语言是什么意思? C ++的4种范例是什么?b
是什么使它们成为范例? C ++ / CLI是C ++的第五范式吗?

为什么/为什么不呢?


谢谢,

crichmon

I''ve perused the FAQ, found some mention of paradigm, but didn''t really find
an answer to my question.

What is meant by "C++ is a 4 paradigm language?" What are the 4 paradigms
of C++ and what makes them paradigms? Is C++/CLI the 5th paradigm of C++?
why/why not?

thanks,
crichmon

推荐答案

crichmon写道:
crichmon wrote:
我已经仔细阅读了常见问题解答,发现了一些范例,但没有提到真的
找到了我的问题的答案。

C ++是一种4范式语言是什么意思? C ++的4种范式是什么?它们是什么使它成为范例? C ++ / CLI是C ++的第五范式吗?
为什么/为什么不呢?
I''ve perused the FAQ, found some mention of paradigm, but didn''t really find an answer to my question.

What is meant by "C++ is a 4 paradigm language?" What are the 4 paradigms
of C++ and what makes them paradigms? Is C++/CLI the 5th paradigm of C++?
why/why not?




- 程序性。程序直接控制流程

- OO。程序通过虚拟方法间接控制流程

- 泛型。像OO一样但在编译时绑定


- 声明性的。


最后一个就像SQL一样。你按照你想要的结果形状排列元素

,拉动拉绳,元素驱动引擎产生

结果。


我不知道它应该如何在C ++中运行,或者它是什么意思。


我从未学会区分这些范例的理由。请写一下。


-

Phlip
http://industrialxp.org/community/bi...UserInterfaces


crichmon写道:
crichmon wrote:
我已经仔细阅读了常见问题解答,发现了一些范例,但并没有真正找到我的问题的答案。

为什么/为什么不呢?
I''ve perused the FAQ, found some mention of paradigm, but didn''t really find
an answer to my question.

What is meant by "C++ is a 4 paradigm language?" What are the 4 paradigms
of C++ and what makes them paradigms? Is C++/CLI the 5th paradigm of C++?
why/why not?



是C ++是一种多范式语言,目前支持4种范例。

程序范式(函数等),模块化范例

(命名空间),面向对象范例和泛型编程

范例(模板)。每个范例都得到了最佳的空间支持和b&b
和时间效率。


关于C ++ / CLI,我还没有看到其他人称之为第5个范例。也许你已经在我写的页面中看到了它。

我们敢说C ++ / CLI是C ++的第五个范例。然而

如果这有很多科学依据,我不会这样做,如果我收到很多关于它的投诉,我将删除

。 :-)


问候,


Ioannis Vranos

http://www23.brinkster.com/noicys


* Ioannis Vranos:
* Ioannis Vranos:
crichmon写道:
crichmon wrote:
我已经仔细阅读了常见问题解答,发现了一些范例,但没有找到<回答我的问题。

C ++是一种4范式语言是什么意思? C ++的4种范式是什么?它们是什么使它成为范例? C ++ / CLI是C ++的第五范式吗?
为什么/为什么不呢?
I''ve perused the FAQ, found some mention of paradigm, but didn''t really find
an answer to my question.

What is meant by "C++ is a 4 paradigm language?" What are the 4 paradigms
of C++ and what makes them paradigms? Is C++/CLI the 5th paradigm of C++?
why/why not?



是的C ++是一种多范式语言,目前支持4种范式。
程序范式(函数等),模块化范式(命名空间),面向对象范式和通用编程范式(模板)。每个范例都得到了最佳空间和时间效率的支持。



Yes C++ is a multiparadigm language and currently supports 4 paradigms.
The procedural paradigm (functions etc), the modular paradigm
(namespaces), the object oriented paradigm and the generic programming
paradigm (templates). Each paradigm is supported well with optimal space
and time efficiencies.




我不知道。


但肯定不是每个人都同意的。


例如,我绝对不同意C ++支持模块化

编程,因为在C ++中_is_没有模块概念。但是,

C ++允许你通过严格遵循一些

约定(头文件保护等)来伪造它们。这是相同的精神

,因为汇编语言支持面向对象(甚至是旧的TASM)。


-

答:因为它弄乱了人们通常阅读文字的顺序。

问:为什么这么糟糕?

A:热门发布。

问:usenet和电子邮件中最烦人的事情是什么?



I didn''t know that.

But certainly it''s not something everyone agrees on.

For example, I absolutely do not agree that C++ "supports" modular
programming, since there _is_ no module concept in C++. However,
C++ allows you to fake some of it by strictly following some set of
conventions (header file guards etc.). That''s in the same spirit
as assembler language supports object-orientation (even old TASM).

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


这篇关于C ++:4范式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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