Whether something is Declarative or Imperative is a matter of layers. In general purpose programming languages, no language can be completely imperative or declarative. Whether something is imperative or declarative is determined by the framework, root level, or even function definition. However, from a Simplicity perspective, if declarative and imperative approaches are interleaved within the same block definition, the system becomes complex. Therefore, proper composition is the way to simple system design.
Black-box abstraction transforms imperative layer to declarative layer. Conventional interfaces maintain declarative to declarative interactions. Execution semantics transform declarative layers into imperative processes. Metalinguistic abstraction transforms imperative layers into imperative ones.
Programming Paradigms
SICP
Example: Mathematical definition of a square root vs. an algorithm that iteratively improves approximations.
- Declarative knowledge: Defines "what is true" - knowledge that describes what is true
- Imperative knowledge: Explains "how to execute" - procedural knowledge that shows how to do something
Lecture 1A: Overview and Introduction to Lisp
MIT 6.001 Structure and Interpretation of Computer Programs, Spring 2005
Instructor: Harold Abelson, Gerald Jay Sussman, Julie Sussman
View the complete course: https://ocw.mit.edu/6-001S05
YouTube Playlist: https://www.youtube.com/playlist?list=PLE18841CABEA24090
Overview and Introduction to Lisp
Despite the copyright notice on the screen, this course is now offered under a Creative Commons license: BY-NC-SA. Details at http://ocw.mit.edu/terms
Subtitles for this course are provided through the generous assistance of Henry Baker, Hoofar Pourzand, Heather Wood, Aleksejs Truhans, Steven Edwards, George Menhorn, and Mahendra Kumar.
More courses at https://ocw.mit.edu
https://www.youtube.com/watch?v=-J_xL4IGhJA&list=PLE18841CABEA24090

‣
All Programming Philosophies Are About State | World of BS
I recently realized that all the various programming philosophies are concerned with state, and can be boiled down into a simple statement about how to work with state. Object-Oriented - Modifying a lot of state at once is hard to get correct; encapsulate subsets of state into separate objects and allow limited manipulation of the encapsulated sub-state via methods.
https://www.worldofbs.com/minimize-state

Seonglae Cho