paradigms

Confused. Is OO inherently imperative or is is it multi-paradigm?

狂风中的少年 提交于 2019-12-07 17:21:40
问题 As I have read through stackoverflow answers and questions I am getting the impression that OO is compartmentalized to to be inherently imperative. But isn't OO just a way to compartmentalize code and data into real world Objects? If so, why would that forgo other lower level paradigm to work in such a platform? IOW, an Object Based generic type system that is immutable by default would be the way a functional first language would work, an object based generic type system that is mutable by

Confused. Is OO inherently imperative or is is it multi-paradigm?

旧街凉风 提交于 2019-12-06 00:22:14
As I have read through stackoverflow answers and questions I am getting the impression that OO is compartmentalized to to be inherently imperative. But isn't OO just a way to compartmentalize code and data into real world Objects? If so, why would that forgo other lower level paradigm to work in such a platform? IOW, an Object Based generic type system that is immutable by default would be the way a functional first language would work, an object based generic type system that is mutable by default would be the world of imperative languages. Or am I missing something altogether? No . OO and

Do you use MDA/MDD/MDSD, any kind of model-driven approach? Will it be the future?

北城以北 提交于 2019-12-04 12:29:57
问题 Programming languages had several (r)evolutionary steps in their history. Some people argue that model-driven approaches will be The Next Big Thing. There are tools like openArchitectureWare, AndroMDA, Sculptor/Fornax Platform etc. that promise incredible productivity boosts. However, I made the experience that it is either rather easy in the beginning to get started but as well to get stuck at some point when you try something that was unanticipated or pretty hard to find enough information

Scala versus F# question: how do they unify OO and FP paradigms?

我们两清 提交于 2019-12-04 07:36:54
问题 What are the key differences between the approaches taken by Scala and F# to unify OO and FP paradigms? EDIT What are the relative merits and demerits of each approach? If, in spite of the support for subtyping, F# can infer the types of function arguments then why can't Scala? 回答1: I have looked at F#, doing low level tutorials, so my knowledge of it is very limited. However, it was apparent to me that its style was essentially functional, with OO being more like an add on -- much more of an

Is there still a difference between a library and an API?

和自甴很熟 提交于 2019-12-04 07:25:47
问题 Whenever I ask people about the difference between an API and a library, I get different opinions. Some give this kind of definition, saying that an API is a spec and a library is an implementation... Some will tell you this type of definition, that an API is a bunch of mapped out functions, and a Library is just the distribution in compiled form. All this makes me wonder, in a world of web code, frameworks and open-source, is there really a practical difference anymore? Could a library like

The difference between Reactive and Functional-Reactive programming

谁都会走 提交于 2019-12-04 07:24:27
问题 I have been doing some research into reactive programming recently and I'm finding it hard to find a good description of the difference between Reactive and Functional -Reactive. Is it simply that the reactive programming is implemented using functional methods/paradigms as opposed to using declarative or OO paradigms? 回答1: Functional Reactive Programming (FRP) is a specific programming model with a specific semantics. (Actually, there are two variants, which are sometimes called "classic FRP

Markup/Style best practices: How to efficiently distribute style rules over CSS classes?

旧城冷巷雨未停 提交于 2019-12-03 14:57:49
Assume that I have some HTML page, and a corresponding CSS file. I'd like to add rounded corners to some elements. I want to alternate background colors on every other section. I want to add a hover state for each section heading. So forth and so on - I keep styling and styling and styling. It occurs to me that there are three extremes, where it concerns the "who, what, when, where, why and how" of distributing CSS rules over the markup by class, by id, and by hierarchy. Extreme #1: Every style rule is based on an ID. Extreme #2: Every style rule is based on a class. Extreme #3: Every style

What is the difference between Dataflow programming and Reactive programming?

核能气质少年 提交于 2019-12-03 09:27:09
问题 I really can't see the difference between them. They are both about data flowing through instructions and the propagation of changes in the input data. I've read this book (authored by Matt Carcki) and it clearly says that the are both the same. On the other hand the wikipedia establish Reactive programming as a form of Dataflow programming and this stackoverflow answer does it too. So, what is the conceptual difference between Reactive programming and Dataflow programming? 回答1: Reactive

What is the relation of 'Event Driven' and 'Object Oriented' programming?

懵懂的女人 提交于 2019-12-03 09:22:49
问题 These days, I hear almost everywhere about 'event driven' programming. Wikipedia says: In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs/threads. Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications (e.g. Javascript web applications) that are centered around

C++ Techniques: Type-Erasure vs. Pure Polymorphism

末鹿安然 提交于 2019-12-03 08:42:54
问题 What are the advantages/disadvantages of the two techniques in comparison ? And more importantly: Why and when should one be used over the other ? Is it just a matter of personal taste/preference ? To the best of my abilities, I haven't found another post that explicitly addresses my question. Among many questions regarding the actual use of polymorphism and/or type-erasure, the following seems to be closest, or so it seemed, but it doesn't really address my question either: C++ -& CRTP .