- More is not better (or worse) than less, just different.
- Solving a programming problem requires choosing the right concepts.
- A programming paradigm is an approach to programming a computer based on a mathematical theory or a coherent set of principles.
- A language should ideally support many concepts in a well-factored way, so that the programmer can choose the right concepts whenever they are needed without being encumbered by the others.
- The first key property of a paradigm is whether or not it can express observable nondeterminism.
- We recall that nondeterminism is when the execution of a program is not completely determined by its specification, i.e., at some point during the execution the specification allows the program to choose what to do next.
- The second key property of a paradigm is how strongly it supports state.
- State is the ability to remember information, or more precisely, to store a sequence of values in time.
- Computer programming permits the construction of the most complex systems.
- A programming language is not designed in a vacuum, but for solving certain kinds of problems.
- Declarative programming is at the very core of programming languages.
- Declarative programming will stay at the core for the foreseeable future.
- Deterministic concurrency is an important form of concurrent programming that should not be ignored.
- Message-passing concurrency is the correct default for general-purpose concurrent programming instead of shared-state concurrency.
- The ultimate software-system is one that does not require any human assistance. Such a system is called self-sufficient.
- Programming paradigms are built out of programming concepts.
- A record is a data structure: a group of references to data items with indexed access to each item.
- The record is the foundation of symbolic programming.
- Many important data structures such as arrays, lists, strings, trees, and hash tables can be derived from records.
- When combined with closures, records can be used for component based programming.
- The lexically scoped closure is an enormously powerful concept that is at the heart of programming.
- From an implementation viewpoint, a closure combines a procedure with its external references.
- Many abilities normally associated with specific paradigms are based on closures.
- Component-based programming is a style of programming in which programs are organized as components, where each component may depend on other components.
- To implement independence we need a new programming concept called concurrency. When two parts do not interact at all, we say they are concurrent.
- COncurrency is a language concept, and parallelism is a hardware concept.
- The fundamental difference between processes and threads is how resource-allocation is done.
- The operating system’s chief role is to arbitrate the resource requests done by all the processes and to allocate resources in a fair way.
- Despite their popularity, monitors are the most difficult concurrency primitive to program with.
- State introduces an abstract notion of time in programs.
- A good rule is that named state should never be invisible: there should always be some way to access it from the outside.
- The main advantage of named state is that a program can become modular. The main disadvantage is that the program can become incorrect.
- A user of a data abstraction does not need to understand how the abstraction is implemented.
- Object-oriented programming, as it is usually understood, is based on data abstraction with polymorphism and inheritance.
- In computer programming, we see an entity is polymorphic if it can take arguments of different types. This ability is very important for organizing large programs so that the responsibilities of the program’s design are concentrated in well-defined places instead of being spread out over the whole program.
- Instead of inheritance, we recommend to use composition instead.
- One of the major problems of concurrent programing is nondeterminism.
- Debugging and reasoning about programs with race conditions is very difficult.
- In lazy execution, it is the consumer of a result that decides whether or not to perform a calculation, not the producer.
- Lazy execution does the least amount of calculation needed to get a result.
- Decades of research show that parallel programming cannot be completely hidden from the programmer: it is not possible in general to automatically transform an arbitrary program into a parallel program.
- The best we can do is make parallel programming as easy as possible.
- Repeated code is a source of errors: if one copy is fixed, all copies have to be fixed.
- The programming language and its libraries should help not hinder the programmer.
- Programming languages should support several paradigms because different problems require different concepts to solve them.
- Each paradigm has its own “soul” that can only be understood by actually using the paradigm.
20181121
Programming Paradigms for Dummies Peter Van Roy
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment