Final Flashcards
Imperative programming languages are based on a:
paradigm but functional programming languages are based on:
statement-at-a-time
mathematical functions
What Greek letter is often used to denote Scheme ? Why?
Greek letter L(lambda)
Essentially a lambda is a block of code that can be passed as an argument to a function call
Define referential transparency.
the evaluation of a function always produces the same result given the same parameters
Who developed LISP and when?
late 50s by John McCarthy
What data types were parts of the original LISP?
atoms and lists
What does the abbreviation REPL stand for?
read-evaluate-print loop
Is Scheme statically or dynamically scoped?
statically scoped
If Scheme were a pure functional language, could it include PRINT? Why or why not?
No, because there is no state change, it will return the same expression
What is tail recursion?
No operation to perform after recursive function. Returns recursive call directly
Imperative languages vs functional languages
imperative languages:
based on the von Neumann architecture In an imperative language, operations are done and the results are stored in variables for later use
functional languages:
based on mathematical functions variables are not necessary, as is the case in mathematics
Logic languages are declarative and imperative languages are procedural. Explain the difference between declarative ( nonprocedural ) and procedural
declarative: A computer language that does not require writing traditional programming logic
procedural: the use of code in a step-wise procedure to develop applications
Imperative languages are based on: paradigmfunctional languages are based on:
logic languages are based on:
statement-at-a-time
mathematical functions
formal logic
Resolution:
an inference principle that allows inferred propositions to be computed from given propositions
Unification:
finding values for variables in propositions that allows matching process to succeed
Instantiation:
assigning temporary values to variables to allow unification to succeed