OEP

134

Title

Improved array constructor syntax

Summary

Make the syntax of array constructors less unusual.

Owner

Adam Sampson <ats@offog.org>

Status

Proposed

Date-Proposed

2006-03-14

Keywords

language constructors

The existing syntax for array constructor expressions looks like this:

[i = 0 FOR 10 | 42 * i]

This is backwards, both from regular occam replicated processes (in that the replicator is usually written after the process keyword it is replicating) and from constructor expressions in other languages; it would be more natural to have the replicator on the right-hand side of the constructor:

[42 * i | i = 0 FOR 10]

The argument against this is that with regular replicators, the replicator comes before the content of the block that it replicates; the existing syntax thus mirrors this usage rather than other languages.

OEP/134 (last edited 2007-09-27 00:55:29 by ats1)