46
votes
Error handling considerations
CLAIM: The exception mechanism is a language semantic for handling errors
exceptions are a control-flow mechanism. The motivation for this control-flow mechanism, was specifically separating error ...
34
votes
In OOP, what counts as a "getter"
So what exactly is a "leaky abstraction" via getters ? Emphasis on exactly. What is exposing data exactly ?
If you're looking for exact deterministic discussion of big picture software ...
33
votes
Accepted
Error handling considerations
Error-handling is perhaps the hardest portion of a program.
In general, realizing that there is an error condition is easy; however signalling it in a way that cannot be circumvented and handling it ...
29
votes
Accepted
Do functional programming languages disallow side effects?
Functional programming includes many different techniques. Some techniques are fine with side effects. But one important aspect is equational reasoning: If I call a function on the same value, I ...
28
votes
Is declarative programming just imperative programming 'under the hood'?
At a lower level, every(?) CPU in current use is essentially imperative so yes, everything has to be imperative at some level.
However, to some extent that's not really important: everything is an ...
21
votes
Accepted
Is declarative programming just imperative programming 'under the hood'?
Differences
So is declarative programming just imperative programming 'under the hood'? If so then how to differentiate them two?
Two of the major differences between declarative and imperative ...
19
votes
Is there a programming paradigm that promotes making dependencies extremely obvious to other programmers?
Discoverability
Its absence plagues many organizations. Where is that tool that Fred built again? In the Git repository, sure. Where?
The software pattern that comes to mind is Model-View-ViewModel....
15
votes
Error handling considerations
I would like to understand better the implications of using such a paradigm in a project:
Is the premise to the problem correct? or Did I missed something relevant?
Is the solution a good ...
13
votes
What's The Difference Between Imperative, Procedural and Structured Programming?
I am afraid none of the answers given so far capture the core of the concepts very well.
Imperative, procedural and structured are not mutually exclusive properties, they just focus on different ...
13
votes
Accepted
How to reconcile Dependency Injection and Convention over Configuration?
Convention over configuration doesn't mean "let's take the easy path;" it means that certain programming decisions are already made by default. It is used by software frameworks to decrease ...
11
votes
Is declarative programming just imperative programming 'under the hood'?
To expand already existing answers, there are languages like VHDL which are mainly for writing declarative code and they can produce truly declarative output in the form of hardware, which executes &...
10
votes
Is there a programming paradigm that promotes making dependencies extremely obvious to other programmers?
The best way to approach these sorts of problems is incrementally. Don't get frustrated and propose wide, sweeping architectural changes. Those will never get approved, and the code will never ...
9
votes
Before OOP, how were systems modeled
It would be pretty silly to think that we didn't have objects before OOP.
OOP formalizes a notion of class, which allows arguably superior code organization. But these same constructs can be ...
9
votes
Is assignment declarative or imperative?
Declarative vs imperative programming cannot always be distinguished on a syntactical level. To a large part, this is more about different programming styles: a declarative program will mostly ...
9
votes
In OOP, what counts as a "getter"
A "getter", for the purposes above of talking about code maintainability and design, is any method that returns an object that already existed when the call began, that the caller didn't ...
8
votes
Accepted
Has any language enforced Command–query separation?
Yes, SQL has distinct commands for querys (reads) and commands (updates).
SQL has different commands for DML (Data Manipulation Language) for performing INSERT, UPDATE, DELETE.
For reads, use DQL (...
8
votes
Accepted
What is the programming paradigm when I just use functions in a file to organize my program?
The programming paradigm that organizes the software into functions is called procedural programming. For example, C is a procedural programming language. Most dynamic languages like JS or Python can ...
8
votes
Colleague wants web apps to behave like Windows desktop programs
User expectations should be taken into account when developing software but users are bad sources of UX/UI specifications. You need to have (or be) a UX/UI designer to design a UI that fulfills the ...
7
votes
Is it possible to say that the difference between imperative programming and declarative programming is merely in the level of abstraction?
Declarative languages are not necessarily higher abstraction level. Thay are not magical - they cannot figure out on its own how to cook eggs if you dont tell it how (unless there is a library for it, ...
7
votes
Do functions make Java a functional programming language?
OOP is a language with sole aim of modeling complex (real-world) systems
No, sorry, no.
OOP is very good at modeling reality. However, that is not its sole purpose, in fact, we often model very ...
7
votes
Accepted
Temporal logic as a programming language paradigm?
TLA+ isn't so much a general purpose language, but...
One of the benefits of using TLA+ to investigate the bug is that once you can reproduce the bug, it’s easy to try alternative fixes. The bug in ...
7
votes
Accepted
What's an abstraction?
Probably an example could help.
Let's say you want to do an HTTP request to an API and process its JSON response. Such process involves, at software level:
Doing a DNS request in order to transform ...
6
votes
Did GO embrace any language construct introduced in Java?
No, Go does not show any particular influence from Java. Go and Java do share similar goals, but took different paths to achieve these goals. The Go designers are of course aware of Java, C#, C++, ...
6
votes
Before OOP, how were systems modeled
OOP is actually more limited as far as modeling is concerned. The reason is every verb must be tightly coupled to exactly one noun. Other paradigms don't have that limitation. You don't have to make ...
6
votes
Before OOP, how were systems modeled
Before OOP, the structured programming paradigm used to separate processes and data.
This separation also applied for modelling:
Processes used to be modelled with dataflow diagrams (the most ...
6
votes
In OOP, what counts as a "getter"
A getter is a failure to design an object. It violates encapsulation which is a core principle of object oriented programing.
Now please tell me, how do you design a libraries hash table collection ...
5
votes
Accepted
What is the proper terminology for this sort of thing?
It appears you are building a table of values and address of the routine to call. This appears to be a "Dispatch Table".
5
votes
Do functional programming languages disallow side effects?
No programming language eliminates side effects. I think it's better to say that declarative languages contain side effects while imperative languages do not. However, I'm not so sure that any of this ...
5
votes
Is assignment declarative or imperative?
In a declarative approach, you declare facts, for example that gravity g is 9.80665 m/s2 or the number or wheels x is 3.
Many programming languages express this with some kind of declaration or ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
paradigms × 102functional-programming × 26
object-oriented × 22
programming-languages × 17
design-patterns × 5
programming-practices × 5
terminology × 5
imperative-programming × 5
design × 4
c# × 4
javascript × 4
coding-style × 4
declarative-programming × 4
language-agnostic × 3
java × 2
architecture × 2
c++ × 2
algorithms × 2
python × 2
c × 2
language-design × 2
exceptions × 2
learning × 2
haskell × 2
modeling × 2