Hoofdstuk 9 Flashcards

1
Q

Can one programming language follow multiple paradigms?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some principles and strategies programming languages follow

A

Procedural
Imperative
OOP
Functional
Logic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What would fall under imperative paradigms?

A

Procedural (Fortran, Pascal, Basic C)
Object Oriented (SmallTalk, C++, Java)
Scripting Languages (Perl, Python, JavaScript)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What would fall under declarative paradigms?

A

Functional programming (Scheme, ML, haskel)
Logic programming (Prolog, Datalog)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is imperative?

A

Giving an authoritative command (or statements)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does imperative use to change a program’s state?

A

Assignments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does imperative focus on?

A

On how a program operates (Algorithms)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does imperative do in high-level?

A

Describes program state by variables, and statements are the machine instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does imperative do in low-level?

A

Uses machine code to modify a program state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How are declarative languages often defined as?

A

Non-imperative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do declarative languages describe instead of how to do something?

A

It describes what to do, or what a program should be

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do declarative languages describe programs.

A

By desired results, rather than provide commands which should be performed by a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What languages are part of the declarative paradigm?

A

Functional languages
Logic languages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Is there a clear distinction between imperative and declarative languages?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why do we care about paradigms?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are most of the programming languages?

A

Imperative + OOP

17
Q

Why do we need programming languages other than imperative + OOP

A

Software is always evolving
Some features considered useful in other paradigms can be adopted in the future

18
Q

What is Scripting Language?

A

Can use multiple programs

19
Q

What are Scripting Languages often called?

A

Glue Languages

20
Q

What are some general purpose scripting languages?

A

Perl
Python
Ruby
PowerShell
AppleScript

21
Q

What are some web scripting languages?

A

PHP
JSP
Ruby on Rails
JavaScript
TypeScript

22
Q

What are some common characteristics between these paradigms?

A

Provide both batch and interactive mode
Easier to write - simple expressions
Simple Scoping Rules with Optimal Declarations
Flexible and dynamic typing
Good for Pattern Matching and String Manipulation
High-level Data Structures

23
Q

What are some problem domains?

A

Shell scripts
Text Processing and Report Generation
Mathematics and Statistics
General Purpose Glue Language
Extension Language
Web Applications

24
Q

Explain Shell scripts

A

Manipulating files and directories
Interactive glue unix commands

25
Q

Explain Text Processing and Report Generation

A

Support of pattern matching and manipulation
Perl: Practical Extraction and Report Language

26
Q

Explain Mathematics and Statistics

A

Easy to write, easy manipulation of data
R and Python are popularly used in this area

27
Q

Explain General Purpose Glue Language

A

You can connect or redirect one program’s output to another program’s inputE

28
Q

Explain Extension Language

A

Scripting languages are often used to add more useful features (such as new commands) to existing programs
Ex: LUA

29
Q

Explain web applications

A

Used both in server and client sides