1/6
Prelim Topic
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Programming Paradigms
It is a style, or “way” of programming
Some languages make it easy to write in some but not others.
Imperative Programming
(Major Programming Paradigms)
Control flow in _ is explicit: commands show how the computation takes place, step by step. Each step affects the global state of the computation.
Programming with an explicit sequence of commands that update state.
Structured Programming
(Major Programming Paradigms)
Is a kind of imperative programming where control flow is defined by nested loops, conditionals, and subroutines, rather than via gotos. Variables are generally local to blocks (have lexical scope)
Programming with clean, goto-free, nested control structures.
Object Oriented Programming
(Major Programming Paradigms)
Is based on the sending of messages to objects. Objects respond to messages by performing operations, generally called methods. Messages can have arguments. A society of objects, each with their own local memory and own set of operations has a different feel than the monolithic processor and single shared memory feel of non object oriented languages.
Declarative Programming
(Major Programming Paradigms)
Control flow in _ programming is implicit: the programmer states only what the result should look like, not how to obtain it.
No loops, no assignments, etc. Whatever engine that interprets this code is just supposed go get the desired information, and can use whatever approach it wants.
Programming by specifying the result you want, not how to get it.
Functional Programming
(Major Programming Paradigms)
In _ programming, control flow is expressed by combining function calls, rather than by assigning values to variables
Logic and Constraint Programming
(Major Programming Paradigms)
These are two paradigms in which programs are built by setting up relations that specify facts and inference rules, and asking whether or not something is true (i.e. specifying a goal.) Unification and backtracking to find solutions (i.e.. satisfy goals) takes place automatically.