Tags: #types #procedural #imperative #declarative #structured
Imperative programming:
Telling the “machine” how to do something, and as a result what you want to happen will happen.
Go is imperative in nature as some common language abstractions (e.g. Array#map
) are absent and encourages an explicit imperative programming style.
NOTE: Procedural programming is derived from ‘imperative’ programming and is named as such because it groups instructions into ‘procedures’.
Declarative programming:
Telling the “machine” what you would like to happen, and let the computer figure out how to do it.
Functional Programming and its abstractions (e.g. Array#map
instead of for
) allow you to focus on what we want to happen rather than how to iterate the object.
Structured programming:
Makes extensive use of subroutines, block structures, for
and while
loops.
Object-Oriented Programming is an extension of this.