Functional Languages (L14) Flashcards
The design of imperative languages is based directly on which architecture model?
Von Neumann
architecture.
Does the Von Neumann architecture prioritize suitability for software development, or efficiency?
Efficiency.
Define the mathematical function.
it is a mapping of members of one (domain) set, to another (range) set.
C, Python, and Java functions are better described as?
Procedures.
What difference is there between procedures and true functions?
Procedures produce side effects (not pure mappings).
Does the modification of a global variable within a function count as a side effect?
Yes.
What term is used to refer to the consistency of a function’s output?
Referential integrity.
Do procedures in C, Python or Java have referential integrity?
They might - not neccesarilly, as is the case for pure functions.
Do side effects affect the evaluation order of statements?
Yes - the elimination of side effects generally reduce the importance of evaluation order.
Are functional languages used in industry?
Not as much as imperative languages.
Are functional languages used in research?
Mostly, yes.
Do imperative or functional languages have greater correctness?
Functional, and thus functional languages are more reliable.
In what way does correctness impact concurrency?
Correct functions do no manipulate global state, and thus they may be executed concurrently.
What’s a higher-order function?
A function that takes functions as parameters and/or yields a function as its result.
What’s a functional form?
Same as a higher order function.