Skip to main content
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 ...
amon's user avatar
  • 135k
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 ...
Philip Kendall's user avatar
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 ...
Lawnmower Man's user avatar
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 ...
Martin Maat's user avatar
  • 18.5k
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 ...
hrender's user avatar
  • 164
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 ...
Robert Harvey's user avatar
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 &...
Jiří's user avatar
  • 249
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 ...
Insac's user avatar
  • 201
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 ...
Telastyn's user avatar
  • 110k
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 ...
amon's user avatar
  • 135k
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 ...
Simon Richter's user avatar
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 ...
Daniel T.'s user avatar
  • 3,061
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 ...
Christophe's user avatar
  • 80.6k
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 ...
IMSoP's user avatar
  • 5,887
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 ...
Doc Brown's user avatar
  • 214k
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 ...
maetl's user avatar
  • 146
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 ...
JacquesB's user avatar
  • 61k
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 ...
Christophe's user avatar
  • 80.6k
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 ...
Daniel T.'s user avatar
  • 3,061
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 ...
JacquesB's user avatar
  • 61k
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-...
max630's user avatar
  • 2,585
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 ...
Jeremy Brown's user avatar
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 ...
Daniel T.'s user avatar
  • 3,061
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 ...
Roman Susi's user avatar
  • 1,793
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 ...
Karl Bielefeldt's user avatar
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, ...
frIT's user avatar
  • 193
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 ...
Steve's user avatar
  • 11.7k

Only top scored, non community-wiki answers of a minimum length are eligible