2.?.? (Programming paradigms) Flashcards
1
Q
What is a programming paradigms?
A
- An approach to programming
2
Q
What is procedural programming?
A
- Building block: single instructions
- Built in data types and basic structures
- Instructions run in order
3
Q
What are the advantages of procedural programming?
A
- Easier to learn and use than other languages
- Require little in the way of structure for simple tasks
4
Q
What are the disadvantages for procedural programs?
A
- Require a lot of code for complex programs
- Less efficient than other paradigms due to the need to repeat code
5
Q
What is functional programming?
A
- Building block: functions
- All instructions contained in functions
- program runs by running functions
6
Q
What are the advantages of functional programming?
A
- Functions can be reused, saving code and time
- Variables can be protected within functions
7
Q
What are the disadvantages of functional programming?
A
- Higher barrier to entry
- Lots of structures needed even for simple tasks
8
Q
What is declarative programming?
A
- Building block: statements
- User states the desired task or outcome
- The language works out the best way to deliver the outcome
9
Q
What are the advantages for declarative programming?
A
- Much less code knowledge needed from user
- Program selects efficient methods to solve tasks
10
Q
What are the disadvantages for declarative programming?
A
- Less control over method of problem solving
- unusual