Introduction Flashcards

1
Q

Haskell consists of purely…

A

Mathematical Functions

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

Haskell computes via…

A

Reduction

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

Haskell is based on the…

A

Lambda Calculus

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

What are the 5 core traits of Haskell (and any functional programming language)?

A

Immutability, less side effects, purely mathematical functions, declarative, lazy evaluation.

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

Define Purely Mathematical Functions

A

Haskell works solely with mathematical expressions due to being based on the Lambda Calculus.

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

Define Immutability

A

Variables in Haskell can not be modified or re-assigned. This makes scripts easier to process for the CPU.

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

Define Less / No side effects

A

Due to immutability, Haskell variables have less chance of affecting variables outside of their local environment.

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

Define Declarative Language

A

A programming paradigm that identifies the constraints and end results of the program, and allows the compiler to provide the most effective way of reaching the end result, as opposed to imperative languages.
Declarative does not focus on the how.

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

Define Lazy Evaluation

A

Lazy evaluation means that only the absolutely necessary computations are made to achieve the end result.

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

Define Software Runaway

A

Software projects that don’t get finished due to increasing complexity and cost amongst other things.

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

Why is Haskell naturally easier to understand than imperative languages?

A

Because it is not referentially opaque, thus programmers don’t have to constantly keep state in mind. It’s stateless.

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

What is meant by referentially opaque?

A

Values of variables change over time. States are constantly changing.

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

No referential opacity means no…

A

Sequence and state.

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

Define referential transparency. Why does it make programming easier?

A

Values can’t change over time (immutable). This means programs in Haskell are stateless and are easier to run in parallel due to no update errors such as race condition.

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