Skip to main content

Questions tagged [imperative-programming]

16 votes
7 answers
9k views

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
  • 295
0 votes
1 answer
124 views

Context To level set, I've been working with OOP and FP for my whole career, so my experience with the imperative paradigm is limited. The team I joined is made up of very senior (20+ years xp) ...
Pete's user avatar
  • 1,247
3 votes
5 answers
1k views

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
10 votes
4 answers
2k views

I'm learning about "Functional Core, Imperative Shell" as espoused by Gary Bernhardt in his talk about "Boundaries". In reality, it seems like these ideas have been known for a ...
Maletor's user avatar
  • 209
0 votes
1 answer
172 views

Would it be (mostly) correct to say that the following are the parallels to the Haskell Monad operations in the imperative world? Monad's >> ~ C/C++/JavaScript/etc. , operator do expressions ~ C/...
P Varga's user avatar
  • 339
14 votes
6 answers
3k views

Something that has really be getting under my skin recently is that Salesforce uses the term "Declarative Development" to mean "Low Code" or "visual code". For example, this article explains the ...
NSjonas's user avatar
  • 267
4 votes
1 answer
130 views

I have a project that does some Dijkstra searches on a graph, I implemented a red-black tree and priority queue that I use for the nodes, however I also need the same data structures for other things ...
Materia Gravis's user avatar
1 vote
2 answers
377 views

For a long time, the use of these Monad structures has been restricted to a very small circle of languages, many of them purely functional (mainly due to problems related to the management of the IO). ...
Jack Rock's user avatar
12 votes
4 answers
3k views

If my function meets the two requirements listed below, I believe that the function Sum returns the summation of the items in a list, where item evaluates as true for a given condition. Doesn't this ...
rahulaga-msft's user avatar
11 votes
3 answers
5k views

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
4 votes
2 answers
749 views

I'm trying to reconcile my object-oriented/functional mind with programming in a language with C. Let's say I want to achieve dynamic dispatch in C, say I want to have a collection of tasks to execute....
Phoenix's user avatar
  • 758
4 votes
1 answer
444 views

There are huge benefits to pure functions in functional programming, but can the same benefits be obtained in imperative programming with heavy use of the service pattern? I ask because I want to ...
clinux's user avatar
  • 287
1 vote
0 answers
344 views

During its evolution C# gradually gets more and more features which belong to functional paradigm. Subjectively these features allow (at least me) to be more productive, fluent and write maintainable ...
Pavel Voronin's user avatar
3 votes
2 answers
230 views

Sometimes we meet a situation where we should iterate (or map) over a collection, applying the same procedure (function) for all elements except the first one. The simplest example is finding the max ...
ov7a's user avatar
  • 141
3 votes
3 answers
624 views

Let's say you want control a motor in real time. Normally you would use a microcontroller or PC with e.g. c-programming language. So you would use an imperative approach. You tell the microcontroller ...
CPA's user avatar
  • 183

15 30 50 per page