Programming Paradigms Flashcards
First, solve the problem. Then, write the code
John Johnson
A pattern or model in which we try to accomplish a task.
Paradigm
Are different ways or styles in which a given program or programming language can be organized.
Programming Paradigm
Each paradigm consists of certain (blank,blank,blank) about how common programming problems should be tackled.
Structures, Features, and Opinions
What a Programming Paradigm is not?
Not a programming language itself.
Not a specific algorithm or technique.
Not a universal solution for all problems.
Not a rigid set of rules; it provides guidelines.
Not a replacement for good software design.
Not dependent on the syntax of a language.
Not inherently better; effectiveness depends on context.
Not limited to a single programming language.
Not static; paradigms evolve over time.
Major Programming Paradigms
Imperative Programming
Procedural Programming
Functional Programming
Declarative Programming
Object-Oriented Programming
Consists of sets of detailed instructions that are given to the computer to execute in a given order. Focuses on describing how a program operates, step by step.
Imperative Programming
It’s called (blank) because as programmers we dictate exactly what the computer has to do, in a very specific way.
Imperative
A derivation of imperative programming, adding to it the feature of FUNCTIONS.
Procedural Programming
Functions are also known as?
“procedures” or “subroutines”
In procedural programming, the user is encouraged to (blank) the program execution into functions, as a way of improving modularity and organization.
Subdivide
It’s a pure function that relies only on its inputs to generate its result. Given the same input, it will always produce the same result.
Functional Programming
Functions are treated as (blank), meaning that they can be assigned to variables, passed as arguments, and return from other functions.
First-Class Citizens
Is all about hiding away complexity and bringing programming languages closer to human language and thinking.
Declarative Programming
Declarative Programming is the exact opposite of (blank) in the sense that the programmer doesn’t give instructions about how the computer should execute the task, but rather on what result is needed.
Imperative Programming
The core concept is to separate concerns into entities which are coded as objects.
Object-Oriented Programming
Each entity will group a given set of (blank) and (blank) that can be performed by the entity
Information (Properties) and Actions (Methods)