Vector Operations

Overview:

Addition of a new concept along with its associated operations. The vector concept is that operations on collections of objects may be specified directly, without the use of looping constructs. Similar concepts in other languages include mapping in functional languages.

Proposed by:

Jeff Walker (language designer)

Experts to Contact:
jwalker@cs.oberlin.edu

Status: Being Considered

Status Rational:

Reason:

Within the confines of object oriented programming, recursion is currently the only repetition method. Object X has the procedural looping constructions only for compatibility with procedural approaches. Vector operations would allow the construction of such actions in a declarative style more compatible with the spirit of object oriented programming.

Description:

The vector concept is that operations may be carried out on collections of object directly. This is achieved by describing those operations in terms of a vector. A vector is the result of the use of one of the for forms of the vector operator. A vector is not a collection type. It is not possible to create a property to hold a vector. Instead a vector is a generalization of an ordered collection of entities of the same type. Vectors have an element type and length. The following additions would be made to the language to support this concept.

Other useful features with vectors would include the production of vectors containing sequence values in a range. Say by 'A'$'Z' for example. Also operators like element of and subset. When comparing two vectors for equality perhaps if they are different length they should simply not be equal. It may also be useful to make ways to prevent vector operators from working in some cases.

Example:



jwalker@cs.oberlin.edu