The Mudcat Café TM
Thread #32286   Message #1811874
Posted By: The Fooles Troupe
16-Aug-06 - 11:11 PM
Thread Name: Help: Terminology for endless loop songs
Subject: RE: Help: Terminology for endless loop songs
Recursion
In mathematics and computer science, recursion specifies (or constructs) a class of objects or methods (or an object from a certain class) by defining a few very simple base cases or methods (often just one), and then defining rules to break down complex cases into simpler cases.

For example, the following is a recursive definition of person's ancestors:

One's parents are one's ancestors (base case);
The parents of any ancestor are also ancestors of the person under consideration (recursion step).
It is convenient to think that a recursive definition defines objects in terms of "previously defined" objects of the class to define.


Reentrant

A computer program or routine is described as reentrant if it can be safely called recursively or from multiple processes. To be reentrant, a function must hold no static data, must not return a pointer to static data, must work only on the data provided to it by the caller, and must not call non-reentrant functions.

Despite a common misconception, this is not the same as being designed in such a way that a single copy of the program's instructions in memory can be shared.

The kernel code or the code implementing synchronization like semaphore is generally not reentrant because it handles the shared memory (i.e., the 'environment,' of which there is normally only one instance). Note that multiple levels of 'user/object/process priority' and/or multiprocessing greatly complicate the control of reentrant code.


Iteration

This article discusses a technique which is used in mathematics and in computer programming. For use in the Japanese and Chinese languages see iteration mark.
The word iteration is also used in the context of Project Management, particularly software development.

The word iteration is sometimes used in everyday English with a meaning virtually identical to repetition.

Mathematics
Iteration in mathematics may refer to the process of iterating a function, or to the techniques used in iterative methods for solving numerical problems.


Computing
Iteration in computing is the repetition of a process within a computer program. It can be used both as a general term, synonymous with repetition, and to describe a specific form of repetition with a mutable state.

When used in the first sense, recursion is an example of iteration, but typically using a recursive notation, which is typically not the case for iteration.

However, when used in the second (more restricted) sense, iteration describes the style of programming used in imperative programming languages. This contrasts with recursion, which has a more declarative approach.