The Oberon+ Programming Language

A lean, statically typed, compiled, general-purpose, procedural, object-oriented, and garbage collected programming language in the Pascal tradition, with support for generic programming

View it on GitHub

16 July 2021

Comparing Oberon+ with Oberon-2 and Oberon-07

by Rochus Keller

(Updated 2022-05-18)

The Oberon+ language definition started as a union of the Oberon-07 and Oberon-2 language definitions. Since both Oberon-2 and Oberon-07 are an extension of the first Oberon version (1987 and 1990), the Oberon+ language definition therefore also includes the original Oberon language. This means that each program written in Oberon up to Oberon-2 and including Oberon-07 is compatible with the Oberon+ compiler.

Oberon-2 added the following elements to the original Oberon:

Oberon-07 (revision 3.5.2016) also describes itself as an extension of the original Oberon (thus ignoring most of the Oberon-2 extensions); here is a list of the major changes in Oberon-07:

Since Oberon+ includes a union of Oberon-2 and Oberon-07, all removals done by Oberon-07 are ignored. The resulting redundancy with WITH and type CASE is tolerated in favor of compatibility. To accomodate the effect of the Oberon-07 RETURN, procedure bodies can either consist of BEGIN plus statement sequence, or a RETURN statement. Oberon-07 programs with read-only access to imported module variables still run on Oberon+ without modification (they simply do without write access); if the author of an Oberon-07 module wants to enforce read-only exports of the module variables, visibility mark must be changed to “-“.

In addition to the above, Oberon+ adds the following:

Features in evaluation: