TDT4165: Programming Languages
# Definitions
Syntax
: The set of rules that defines the combinations of symbols that are recogized as sentences.
Semantics
: Defines what programs do when executed.
## Linguistic abstraction
Abstraction and addition to a language, by using already existing concepts of the language
_Example:_ use `proc` to define `fun`
## Declarative programs
- stateless
- independt
- deterministic
In other words, every time you run a declarative program with the same input (or just a declarative component) it will give you the same result (i.e. output).
## Observal declarativity
A component can be seen as declarative if the definition is, even though the implementation is not
_Example:_ A database with a declarative interface.
## Higher-order programming
Use procedure values in programs. (E.g. pass procedures as arguments to other procedures)
__Closure__ = procedure value.
Four basic operations underlie all techniques in higher order programming
### Procedural abstraction
Any statement can be put into a procedure.
### Genericity
The ability to pass procedure values as arguments to a procedure call.
### Instatiation
The ability to return procedure values as results from a procedure call.
### Embedding
Put procedure values in data structures