I have overheard a couple of programmers talk casually about declarative programming, and imperative programming; and how frameworks like ReactJS help you write “declarative” code, and how it is so much better than “imperative” code. Could you explain it abstractly?
Here is a great article on the subject. It does a great job at explaining the differences in thinking. Article
j
stuff ;)
declarative means you describe what you want and not how it should be done in steps. SQL is a classic declarative language example "give me all fields of a table where these expresions are accurate" instead of "give me all expressions and loop them while you are in the loop check if a equals ...." which is imperative because you give specific behavioural instructions.
functional programming is mainly using functions as first class citizens which means you can pass them as variable.
purely functional languages like haskell or lisp don't even have plus or minus operators or loop, if statements because the lambda calculus proves that everything can be described as a function.... which can be mindboggeling :)