Hoofdstuk 9 Flashcards
Can one programming language follow multiple paradigms?
Yes
What are some principles and strategies programming languages follow
Procedural
Imperative
OOP
Functional
Logic
What would fall under imperative paradigms?
Procedural (Fortran, Pascal, Basic C)
Object Oriented (SmallTalk, C++, Java)
Scripting Languages (Perl, Python, JavaScript)
What would fall under declarative paradigms?
Functional programming (Scheme, ML, haskel)
Logic programming (Prolog, Datalog)
What is imperative?
Giving an authoritative command (or statements)
What does imperative use to change a program’s state?
Assignments
What does imperative focus on?
On how a program operates (Algorithms)
What does imperative do in high-level?
Describes program state by variables, and statements are the machine instructions
What does imperative do in low-level?
Uses machine code to modify a program state
How are declarative languages often defined as?
Non-imperative
How do declarative languages describe instead of how to do something?
It describes what to do, or what a program should be
How do declarative languages describe programs.
By desired results, rather than provide commands which should be performed by a computer
What languages are part of the declarative paradigm?
Functional languages
Logic languages
Is there a clear distinction between imperative and declarative languages?
No
Why do we care about paradigms?
Because programming languages following a certain paradigm often share common characteristics, once we understand the paradigm, we can also understand each language’s features more easily