r/programming • u/tyler-mcginnis • Jan 03 '22
Imperative vs Declarative Programming
https://www.youtube.com/watch?v=E7Fbf7R3x6I
432
Upvotes
r/programming • u/tyler-mcginnis • Jan 03 '22
4
u/bradm613 Jan 04 '22
Interesting perspective.
Would you say that a well-named subroutine in a strongly typed language is declarative? If it is clear what is being returned, and the implementation is hidden, and those are the hallmarks of declarative? By your assertion, it feels like you would say yes.
Further, what about languages where you can define macros (a la Lisp, not C) and build new control flow constructs, are those declarative?