paradigms

OOP vs Functional Programming vs Procedural [closed]

末鹿安然 提交于 2019-11-26 04:01:55
问题 What are the differences between these programming paradigms, and are they better suited to particular problems or do any use-cases favour one over the others? Architecture examples appreciated! 回答1: All of them are good in their own ways - They're simply different approaches to the same problems. In a purely procedural style, data tends to be highly decoupled from the functions that operate on it. In an object oriented style, data tends to carry with it a collection of functions. In a

What is the difference between declarative and imperative programming? [closed]

随声附和 提交于 2019-11-26 03:46:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have been searching the web looking for a definition for declarative and imperative programming that would shed some light for me. However, the language used at some of the resources that I have found is daunting - for instance at Wikipedia. Does anyone have a real-world example

What is Component-Driven Development?

喜欢而已 提交于 2019-11-26 03:25:02
问题 Component-Driven Development term is starting to get used widely, esp. in connection with Inversion of Control. What is it? What problems does it solve? When is it appropriate and when not? 回答1: What is it? I think the definition in your answer covers this question well. Although, I question why the definition includes that a component needs to explicitly define its dependencies. A canonical example of a component is an ActiveX control - do they need to explicitly define their dependencies?

Functional, Declarative, and Imperative Programming [closed]

梦想与她 提交于 2019-11-26 02:39:08
问题 What do the terms functional, declarative, and imperative programming mean? 回答1: At the time of writing this, the top voted answers on this page are imprecise and muddled on the declarative vs. imperative definition, including the answer that quotes Wikipedia. Some answers are conflating the terms in different ways. Refer also to my explanation of why spreadsheet programming is declarative, regardless that the formulas mutate the cells. Also, several answers claim that functional programming

Functional programming vs Object Oriented programming [closed]

天大地大妈咪最大 提交于 2019-11-26 02:39:00
问题 I\'ve been mainly exposed to OO programming so far and am looking forward to learning a functional language. My questions are: When do you choose functional programming over object-oriented? What are the typical problem definitions where functional programming is a better choice? 回答1: When do you choose functional programming over object oriented? When you anticipate a different kind of software evolution: Object-oriented languages are good when you have a fixed set of operations on things ,

What is Component-Driven Development?

守給你的承諾、 提交于 2019-11-26 01:42:29
Component-Driven Development term is starting to get used widely, esp. in connection with Inversion of Control. What is it? What problems does it solve? When is it appropriate and when not? aryeh What is it? I think the definition in your answer covers this question well. Although, I question why the definition includes that a component needs to explicitly define its dependencies. A canonical example of a component is an ActiveX control - do they need to explicitly define their dependencies? What problems does it solve? Management of complexity. It seeks to address that by allowing you to only

Double-checked locking in .NET

岁酱吖の 提交于 2019-11-26 01:07:59
问题 I came across this article discussing why the double-check locking paradigm is broken in Java. Is the paradigm valid for .NET (in particular, C#), if variables are declared volatile ? 回答1: Implementing the Singleton Pattern in C# talks about this problem in the third version. It says: Making the instance variable volatile can make it work, as would explicit memory barrier calls, although in the latter case even experts can't agree exactly which barriers are required. I tend to try to avoid