Questions tagged [paradigms]

A fundamental style of computer programming.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
109 views

Which of these combinations is useless?

Reading Peter Van Roy's "Paradigms for Dummies", I am a bit stuck with the second footnote. Van Roy presents a graph depicting paradigms with different combinations of attributes for state. ...
Derek C.'s user avatar
  • 617
15 votes
7 answers
8k views

Is declarative programming just imperative programming 'under the hood'?

From my understanding, in declarative programming, programmer only need to define the end result, but not how to compute it. But for execute that said function, the function must be pre-defined by the ...
Loc's user avatar
  • 177
3 votes
5 answers
855 views

Is assignment declarative or imperative?

On Wikipedia, the article Programming paradigms defines declarative as a paradigm in which the programmer merely declares properties of the desired result, but not how to compute it; imperative as a ...
Géry Ogam's user avatar
1 vote
2 answers
324 views

Colleague wants web apps to behave like Windows desktop programs

I have been creating new ASP.Net web apps for my workplace intranet (it is a closed system, not accessible to customers) and also re-creating some existing Windows programs as web applications. One ...
BreakingGnus's user avatar
1 vote
2 answers
362 views

What's an abstraction?

I know this is a very basic topic, but I'm curious why an abstraction in programming is always defined as a simplification/hiding of some functionality. Let's say I wrote a set of functions that let ...
Wojtek Wencel's user avatar
8 votes
1 answer
587 views

Temporal logic as a programming language paradigm?

So I'm aware there's some degree of timing-based logic in existing programming languages, like threads and the sleep() function (and derivatives thereof), as well as events / delegates. However, I was ...
Emerald47890's user avatar
6 votes
3 answers
1k views

Before OOP, how were systems modeled [closed]

Before the advent of OOP, how were systems modeled in other paradigms of Programming. Obviously, software programs existed prior to 1970's and they interacted with people and where used in crucial ...
LekeOpe's user avatar
  • 271
0 votes
4 answers
3k views

is there any difference between Structured and Procedural Paradigm?

Procedural Paradigm according to Wikipedia: Procedural programming is a programming paradigm, derived from structured programming, based on the concept of the procedure call. Procedures, also known ...
LekeOpe's user avatar
  • 271
9 votes
3 answers
543 views

How to reconcile Dependency Injection and Convention over Configuration?

Dependency Injection forbids casual use of new. It favors good old reference passing. It says to put new as high up the call stack as possible. Convention over Configuration says the common path ...
candied_orange's user avatar
2 votes
2 answers
251 views

What Actually make a Paradigm qualify as being called Structured

According to What Wikipedia says about Structured Programming Paradigm The following qualifies a language to be called Structured "Sequence"; ordered statements or subroutines executed in sequence. "...
LekeOpe's user avatar
  • 271
-2 votes
3 answers
401 views

Do functions make Java a functional programming language? [closed]

I have been struggling to understand programming paradigms. OOP is a paradigm with sole aim of modeling complex (real-world) systems, and it got me thinking: is OOP the only programming paradigm ...
LekeOpe's user avatar
  • 271
1 vote
1 answer
249 views

Python - Paradigm to compute different formulas with the same function

I have different equations to compute the same quantity. For example, val = my_func(a, b, c) but also val = my_func(x, y), where my_func represents the quantity I would like to compute: it could be ...
Davide_sd's user avatar
  • 147
-1 votes
1 answer
303 views

What is the programming paradigm when I just use functions in a file to organize my program?

I'm programming a telegram bot with Python and, for a number of reasons, there are no classes in the whole project, just several functions correlated to the the file where they are located. E.g., my ...
Teodoro Mendes's user avatar
1 vote
1 answer
108 views

What to do if some parameters become constants inside a particular class

I'm sure there's some programming paradigm to cover this case, but I can't find the correct wording for it, and therefore my Google-fu is worthless. I have a class called SimpleWorld that has methods,...
Pro Q's user avatar
  • 677
2 votes
2 answers
1k views

The dilemma of implementing virtual inheritance

I am working on a program language, and I came to the dilemma whether it should support virtual inheritance or not. As a designer and implementer of the language, including that feature represents ...
dtech's user avatar
  • 713
11 votes
3 answers
4k views

Do functional programming languages disallow side effects?

According to Wikipedia, Functional programming languages, that are Declarative, they disallow side effects. Declarative programming in general, attempts to minimize or eliminate side effects. Also, ...
codebot's user avatar
  • 221
7 votes
4 answers
1k views

Is it possible to say that the difference between imperative programming and declarative programming is merely in the level of abstraction?

Is it possible to say that the difference between imperative programming and declarative programming is merely in the level of abstraction? I.e. where the imperative programming will say "break the ...
Olzhas Yessenbayev's user avatar
5 votes
2 answers
735 views

Has any language enforced Command–query separation?

As described here, a function can be said to be a query when it returns a value, and a command when it modifies a value. It also states that a function should not be both. That a query should not be ...
Chris Wohlert's user avatar
2 votes
3 answers
2k views

How to manage configuration and state in a program

At my company we have multiple C# programs that use Dictionaries in a config class to keep track of the configuration and state of the program. For example, bool isFoo = config.GetBool("Foo"); ...
Era's user avatar
  • 128
33 votes
3 answers
5k views

Error handling considerations

The problem: Since long time, I am worried about the exceptions mechanism, because I feel it does not really resolve what it should. CLAIM: There are long debates outside about this topic, and most ...
Adrian Maire's user avatar
1 vote
3 answers
749 views

Neural Networks - The birth of a new programming paradigm

Lately, there has been a lot of hype around Neural Networks. They took over the field of AI, finding applications in computer vision, medicine, natural language processing, etc. There are active ...
Paul92's user avatar
  • 2,571
3 votes
1 answer
152 views

What is the proper terminology for this sort of thing? [closed]

A construct I often use when the list of "things to make a decision on" gets too big to be practical in an if/else or switch statement is to make a table with values and callbacks. For example, ...
Braden Best's user avatar
-4 votes
1 answer
190 views

Did GO embrace any language construct introduced in Java?

GO has embraced, 1) JavaScript/Python language constructs, Higher order function Closure Slicing Range operator Anonymous function(inner function) Provides abstractions ...
overexchange's user avatar
  • 2,265
26 votes
8 answers
2k views

Is there a programming paradigm that promotes making dependencies extremely obvious to other programmers?

I work in a Data Warehouse that sources multiple systems via many streams and layers with maze-like dependencies linking various artifacts. Pretty much every day I run into situations like this: I run ...
Christs_Chin's user avatar
2 votes
3 answers
142 views

Is there a structure/pattern/format that most functions follow?

First time posting. I know this is a very generalized question, sorry for that, I don't know how to more appropriately word this. I've noticed a trend, a pattern in methods, it seems in almost all ...
Soscrates Fd's user avatar
2 votes
1 answer
286 views

Functional Programming in PHP

Modern PHP is mostly written Object Oriented. Other than the fact that there is inertia towards the Object Oriented in the PHP community, is there anything about the language itself that would make it ...
Goose's user avatar
  • 1,878
0 votes
2 answers
113 views

Modernize a compiler, late switch of generation-paradigm

Have been hired to modernize an old binary compiler that has been forgotten since a few years by people who have died already. The compiler has a parser, an objectmodel and a generator of ...
Grim's user avatar
  • 262
0 votes
2 answers
885 views

Exception Handling: When and Why?

The main languages I use are C++ and Java. Both languages support exception handling. I confess, I may not actually understand exception handling, at least, I certainly don't understand why you ...
bigcodeszzer's user avatar
2 votes
1 answer
2k views

Are the paradigms of ReactJS and Redux worthwhile for things other than web-development?

I'm a bit fascinated by the current paradigms shift libraries like ReactJs and Redux have caused in web development. Apart from computer science classes, I wasn't much affected by functional ...
Sven's user avatar
  • 186
0 votes
1 answer
156 views

Would it be possible to create functional, object oriented or declarative architectures? [closed]

My question originates from the fact that the most common architectures are inherently imperative (i.e. the machine language is imperative). Would it be possible to create a computer architecture ...
Paul92's user avatar
  • 2,571
0 votes
1 answer
84 views

Connect different programming paradigms in a real app written in JavaScript [duplicate]

I am learning functional programming, working generally with JavaScript. Many things look promising, like immutable data and stateless flow. Now, I want to build quite a basic CRUD app as a pet ...
Sergei Basharov's user avatar
7 votes
3 answers
268 views

Can I avoid more faults if I use different paradigms for the implementation and the specification/tests?

Since it is convenient for the developer, the same paradigm are often used for implementations and specifications, e.g. for testing (e.g. Java for the implementation and unit tests, Scala for the ...
DaveFar's user avatar
  • 1,416
0 votes
2 answers
185 views

Looking for a specific programming paradigm [closed]

I am searching for programming languages with a certain paradigm, or the name of the paradigm which works like follows: You start with writing the source code of a program or something more like a ...
Alexander Meißner's user avatar
9 votes
3 answers
1k views

What is the functional programming answer to type-based invariants?

I am aware that the concept of invariants exists across multiple programming paradigms. For example, loop invariants are relevant in OO, functional and procedural programming. However, one very ...
Ben Aaronson's user avatar
  • 6,913
3 votes
1 answer
4k views

Advantages of the imperative style over the functional style [duplicate]

There's a lot of hype over functional languages right now, and I've spent the last year studying Haskell as my intro to FP as a result. Seeing the advantages FP provides is easy (such as referential ...
Josiah's user avatar
  • 223
0 votes
1 answer
1k views

Statistics about the usage of programming paradigms [closed]

I hear very often that the object-oriented programming paradigm is the most widespread. But are there any scientific statistics about how often other programming paradigms like procedural programming ...
Philipp Eger's user avatar
5 votes
1 answer
3k views

Modern OOP vs Alan Kays OOP [closed]

I've recently come to discover there's actually a strong amount of criticism towards what people refer to as "modern OOP" - often comparing it to either functional programming or Alan Kays' OOP. ...
n0pe's user avatar
  • 756
0 votes
3 answers
896 views

Various methods manipulating same member variable versus each takes inputs and provides output [closed]

As software design paradigm which is better? to let various methods manipulate a member variable, or define each method or function to take some inputs and provide some outputs? For example class ...
Ahmad's user avatar
  • 1,826
-2 votes
1 answer
582 views

What is design pattern/paradigm for ASP.NET web-apps? [closed]

I don't actually know if my question is correct, but working on a webapp porting from ASP.NET world to Java + Spring platform I came up with this question in mind. Using Spring MVC, the new version ...
davioooh's user avatar
  • 199
13 votes
6 answers
2k views

What Functional features are worth a little OOP confusion for the benefits they bring?

After learning functional programming in Haskell and F#, the OOP paradigm seems ass-backwards with classes, interfaces, objects. Which aspects of FP can I bring to work that my co-workers can ...
Trident D'Gao's user avatar
6 votes
2 answers
689 views

Why "OOP" and not simply "Object Programming"?

Why do we say "Object-oriented programming" and not simply "Object programming"? Why do we speak of orientation in just this case, and not "Functionally-oriented programming" and so?
Niklas Rosencrantz's user avatar
3 votes
3 answers
366 views

Making some methods mostly contain method calls, while others doing "the lowest level" work [duplicate]

So I thought about this, and I don't know if it's included or not in any methodology. I think the advantages of this coding style is that, at the lowest level, the code is extremely testable, and ...
vlad-ardelean's user avatar
2 votes
2 answers
641 views

How much functional programming expertise can programmers be expected to have? [closed]

I'm coding in a non-functional language with functional mechanisms (C# to be specific, but you could substitute, say C++ and use function pointers, or what have you) on a small team. It's my habit to ...
jwrush's user avatar
  • 249
-3 votes
1 answer
206 views

How do you call the discipline which consist of making the right choice of language/paradigm/class diagrams? [closed]

As a physicist, I've learnt programming on my own. But I would like to know the name of the discipline (like algorithmics is the discipline of designing algorithms) which consists of : making the ...
Vincent's user avatar
  • 169
4 votes
1 answer
346 views

Paradigm Diagram

Does anyone have a diagram showing all significant programming paradigms. Something like this but with paradigms as titles would be ideal:
Kris Welsh's user avatar
2 votes
1 answer
737 views

Is the “jQuery programming style” a kind of Reactive programming?

jQuery is a Javascript library and framework, but when we are programming with jQuery into DOM problems/solutions, we can practice a style quite different of programming... We can read about jQuery ...
Peter Krauss's user avatar
54 votes
3 answers
7k views

Why is an anemic domain model considered bad in C#/OOP, but very important in F#/FP?

In a blog post on F# for fun and profit, it says: In a functional design, it is very important to separate behavior from data. The data types are simple and "dumb". And then separately, you ...
Danny Tuppeny's user avatar
3 votes
2 answers
450 views

Dependency properties outside the realm of WPF?

Is there a more general concept or name for what WPF calls "dependency properties"? I imagine this is not a WPF-ism and in fact other libraries or frameworks have employed a similar approach? If so, ...
DuckMaestro's user avatar
1 vote
6 answers
292 views

Good practice -apply paradigm to a language that is not fit for it

For example, what happens if a coder tries to code in purely functional-style paradigm in OO-paradigm language(Java)? Will it work? Or the OO nature of Java will not let it happen? Also, is applying ...
ERJAN's user avatar
  • 232
12 votes
1 answer
965 views

Functional Reactive/Relational Programming – Is there a difference?

I've been using Reactive Cocoa (by GitHub), a Functional Reactive Programming API for use with the Cocoa libraries for a while now, but have just read "Out of the Tar Pit", the paper that supposedly ...
danpalmer's user avatar
  • 223