Chapter 1 (Paradigm) Flashcards
Types of paradignms
Imperative
Object-oriented
Functional
Logic (declarative)
What is imperative paradigm?
uses a sequence of statements to determine how to reach a certain goal.
Examples of imperative languages?
Cobol, fortran, c, ada, perl
What is object-oriented (OO) paradigm?
An oo program is a collection of objects that interact by passing messages that transform the state.
Examples of oo languages?
Smalltalk, Java, c#, c++, python
What is a functional paradigm?
Functional programming models a computation as a collection of mathematical functions.
Input = domain
Output = range
Functional languages are characterized by functional composition, recursion.
Examples of functional languages?
Lisp, Scheme, ML, Haskell
What is a logic paradigm?
Logic programming declares what outcome the program should accomplished
When studying logic programming what do we encounter?
Programs as sets of constraints on a problem
Programs that achieve all possible solutions
Programs that are non deterministic
Prolog
What are the levels of abstraction in computing?
Natural language, Application area, Programming language Compiler/interpreter User interface (IDE) Operating system Machine language
What makes a successful language?
Simplicity and readability Clarity about binding Reliability Support Abstraction Efficient implementation
What is binding?
It is the association between an object and a property of that object
Some examples of binding?
A variable and its type
A variable and its value
What is an early binding?
Early binding takes place at compile-time
What is a late binding?
Late binding takes place at run time