Questions tagged [imperative]
Imperative programming is a paradigm of expressing the logic of a computer program or computation by explicitly describing its control flow in terms of statements that change a program state.
imperative
59
questions
3
votes
1
answer
114
views
Is there a widely-accepted Common Lisp naming convention for functions modifying one or more of their arguments?
In CL, we have incf and setf imperative functions. Scheme uses an exclamation point (e.g. set!, vector-set! etc.) But what, if any, convention do CL programmers use?
0
votes
0
answers
26
views
Display record based on record type and and industry and show a green button icon if account is active using lwc how to implement
Write a LWC component to display Account records in lightning-datatable and show checkbox
field (IsActive) as an image (true: green check, false: red cross). Please don’t use @wire
adapters.
Please ...
2
votes
1
answer
136
views
Is a function that makes local use of mutability pure?
I'm a beginner to Scala, FP, and programming in general. I'm trying to understand when something can be called proper FP.
If we say that functional programming is about chaining functions together so ...
0
votes
0
answers
19
views
Inheriting component that uses useImperativeHandle exposed api
Can't get throght problem of wrapping a component that exposes ref with some api. I need to add some functionality to it and export the same api to its users. I don't need to add new methods to this ...
3
votes
1
answer
791
views
Quarkus Mutiny multithreading
I have some imperative code which processes on 20 Threads in parallel.
IntStream.range(0, 20)
.forEach(t -> {
Runnable runnable = () -> {
int records = RANGE;
...
1
vote
1
answer
80
views
Is there a Declarative approach to converting each member of a TypeScipt array to a full instance of an Object?
I have a class I can't change, simplified version shown. I got an array of variations on the class. I need to add the rest of the class to each member of the array before I can use them.
class ...
1
vote
1
answer
291
views
What is the difference between abstraction and declarative programming?
Declarative programming seems to be achievable through abstraction. So what's the difference between abstraction and declarative programming?
[ My thought ]
I will call the person using the class &...
4
votes
1
answer
1k
views
Quarkus reactive vs quarkus imperative does it matter?
Hello I was reading the following article Quarkus reactive architecture
At the start of the article it says
Quarkus is reactive. It’s even more than this: Quarkus unifies reactive and imperative ...
1
vote
1
answer
529
views
Incrementing a counter with functional programming vs imperative programming
I likely am asking a very stupid question here, please forgive me.
I am a Java and C# backend-engineer with relatively good knowledge of OOP design patterns. I have recently discovered the debate ...
0
votes
1
answer
183
views
Function doesn't print correctly
So I have to create a "lights out" game. I have to create two functions. One function "flip"
val flip : bool array array -> int -> int -> bool array array = <fun>
...
0
votes
1
answer
115
views
Is it possible to mix declarative and imperative paradigms for Android UI development?
Is it possible to mix declarative and imperative paradigms for Android UI development ?
1- In « traditional » Android development, Java + XML are used to create interface elements (in a Rather static ...
1
vote
0
answers
642
views
How to change the structure of a sentence (imperative -> interrogative) in python (NLP)
I would like to build a model that can take a sentence in the imperative form and output a new sentence in an interrogative form (however, the meaning would be the same in both sentences - both ...
0
votes
2
answers
120
views
Simple flow control and variable binding in Clojure
I'm learning Clojure and working on a simple file parsing script.
I have a file in the form of:
pattern1
pattern2
pattern3
pattern1
pattern2
...
where each line has a few values (numbers) that I ...
2
votes
0
answers
199
views
Imperative Triggers in Azure Functions?
I've read many posts re how to use Imperative input and output bindings - I get that, very cool.
However, what I have struggled to find is a way to create Imperative Triggers. I'm not sure if this is ...
2
votes
1
answer
244
views
Make Haskell Imperative
Note: this is an exercise, and I'm trying to understand how things work.
I am trying to make it possible to do something like this in Haskell:
f :: Integer -> Integer
f n = def $ do
i <-...