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 ...
15
votes
Is "Low Code" declarative by default?
I share your criticism and I do not agree with Robert's answer. Robert says
Declarative programming is telling the machine what to do (rather than how)
Telling a computer what to do is essentially ...
14
votes
Accepted
Is "Low Code" declarative by default?
TL;DR -- for most folks "low code" usually means "little/no typing" while "declarative" means something a little different. I'd agree that what Salesforce allows is not "declarative development."
I ...
13
votes
Is "Low Code" declarative by default?
Imperative programming is concerned with telling a machine how to accomplish a task, usually by writing individual programming language instructions. It also includes any method calls where you are ...
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 SQL declarative?
I was thinking of this some days ago after an SQL optimization. I think we can agree that SQL is a "declarative language" in the definition of Wikipedia:
Programming paradigm that expresses the ...
10
votes
Accepted
Precisely define "what to solve" and "how to solve" corollary in functional and imperative programming respectively
Isn't above code snippet is just different way of saying "how to solve" problem ?
Yes. In the end, computer science is invariably about computing so you're always talking about "how to solve" a ...
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 ...
6
votes
Is "Low Code" declarative by default?
From a theoretical perspective, "declarative" languages are usually not Turing complete, and are used in contexts where that isn't necessary or even counterproductive, for example when you need to ...
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 ...
4
votes
Is declarative programming just imperative programming 'under the hood'?
All programming languages are essentially abstractions for humans to express problems, and automate the solution to those problems. The difference between declarative and imperative is in how they ...
4
votes
Are executable requirements the most advanced form of declarative code?
I believe that this is quite obvious
Well, I believe that it is quite obvious that this is wrong.
Requirements, no matter how declarative they are, describe a system only from the black box ...
3
votes
Accepted
Is there an EBNF form for Inform 7
There is a BNF grammar in Chapter 19 of the manual, presented by the authors of Inform with the qualification that it’s “doubtful that BNF is such a good tool for a natural-language system”.
This is ...
3
votes
Is SQL declarative?
First lets clarify what "declarative" means. Declarative is a language paradigm, where the code is a specification of the desired end result, rather than (as in imperative programming) an ...
2
votes
Is declarative programming just imperative programming 'under the hood'?
A programming language is only a mean to express some abstract computational solution, independently of how the language abstractions will be implemented.
So no, it's not just imperative under the ...
2
votes
Is assignment declarative or imperative?
Imperative vs Declarative Programming
Many of the answers here (and the question itself for that matter) fall into the old trap of the "what vs how" metaphor. I think it's the wrong way to ...
2
votes
Is assignment declarative or imperative?
First we need to clarify the distinction between "declarative" and "imperative".
Be aware that there is no single canonical definition of "declarative" in computer ...
2
votes
Are executable requirements the most advanced form of declarative code?
In a sense, a code in any programming is an executable specification. It is more detailed than conventional non-executable specifications, but it is just another level in the hierarchy of non-...
1
vote
Is "Low Code" declarative by default?
You are absolutely correct that SF Flow is pure imperative programming.
Clicking vs Typing is completely irrelevant to whether a program or construct is imperative vs declarative.
As has been answered ...
1
vote
Is "Low Code" declarative by default?
I think the "what vs how" comments aren't very helpful and the article reference from Salesforce falls into this trap. For example if I write a = b + c is that a what or a how?
To me, the ...
1
vote
Precisely define "what to solve" and "how to solve" corollary in functional and imperative programming respectively
In my opinion syntactic expression (be it imperative or functional) is almost pure coincidence wrt "what" and "how". While I can see some analogy with mathematical equations (an equation to be solved ...
1
vote
Precisely define "what to solve" and "how to solve" corollary in functional and imperative programming respectively
In functional programming, the "how" is "evaluate this expression" instead of "execute this sequence of steps." As programmers, we can pretty much automatically translate expressions into sequences of ...
1
vote
Do functional programming languages disallow side effects?
While other answers are correct, my succinctly understanding is that real-world programs can't be useful without interacting with the world outside the computer (input, output: screen, disk, network, ...
1
vote
How could you reconcile declarative database development and non-trivial data 'motions'?
Well, things don't look any better 10 years after the question was asked.
The obstacle to this kind of automatic transformation between table schemas, is that tables of data consist of many properties ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
declarative-programming × 25imperative-programming × 8
functional-programming × 7
paradigms × 4
programming-languages × 3
sql × 3
f# × 3
declarative × 2
design × 1
c# × 1
c++ × 1
php × 1
database × 1
unit-testing × 1
mysql × 1
optimization × 1
requirements × 1
learning × 1
json × 1
sql-server × 1
parsing × 1
source-code × 1
haskell × 1
caching × 1
modeling × 1