本文介绍了当面向对象不是正确的解决方案吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近遇到了一些意见说,面向对象设计/编程不应该总是被使用。


你知道一些使用案例,不会从中受益,而不应使用面向对象的设计呢?




例如:有一些问题(关注)将从中受益AOP

I've encountered lately some opinions saying that Object Oriented design/programming should not always be used.
Do you know some use-cases that will not benefit from and should not use Object Oriented design?

For example: there are some problems (concerns) that will benefit from AOP.

推荐答案

有些问题最好的前$ P $使用其他范式,如函数式编程pssed。此外,声明范式允许对code的正确性,更强大的形式推理。请参见与某些优势语言,不能真正被面向对象的语言,由于匹配的一个很好的例子范式的根本性质。

Some problems are best expressed using other paradigms such as Functional Programming. Also, declarative paradigms allow more robust formal reasoning about the correctness of the code. See Erlang for a good example of a language with certain advantages that can't really be matched by OO languages due to the fundamental nature of the paradigm.

在其他语言范式有一个更适合的问题领域的例子是 ,或的。

Examples of problem domains where other language paradigms have a better fit are database queries (SQL), expert systems (Prolog, CLIPS etc.) or Statistical computing (R).

这篇关于当面向对象不是正确的解决方案吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 05:32