It was developed in 1991 at ETH Zurich by Niklaus Wirth and Hanspeter Mössenböck, who is now at Institut für Systemsoftware (SSW) of the University of Linz, Austria.
Compared to fully object-oriented languages like Smalltalk, in Oberon-2, basic data types and classes are not objects, many operations are not methods, there is no message passing (it can be emulated somewhat by reflection and through message extension, as demonstrated in ETH Oberon), and polymorphism is limited to subclasses of a common class (no duck typing as in Python,[1] and it's not possible to define interfaces as in Java).
Indeed, ETH Oberon makes use of language-level and library-level reflection abilities extensively.
Oberon-2 provides built-in runtime support for garbage collection similar to Java and performs bounds and array index checks, etc., that eliminate the potential stack and array bounds overwriting problems and manual memory management issues inherent in C and C++.
The following Oberon-2 code implements a simple binary tree: Procedures can be bound to a record (or pointer) type.
The entire Oberon-2 language is described (Mössenböck & Wirth, March 1995) using only 33 grammatical productions in the extended Backus–Naur form, as shown below.
Oberon-2 compilers maintained by ETH include versions for Windows, Linux, Solaris, macOS.
[4][5] There is an Oberon-2 Lex scanner and Yacc parser by Stephen J. Bevan of Manchester University, UK, based on the one in the Mössenböck and Wirth reference.
There is a release named Native Oberon which includes an operating system, and can directly boot on PC class hardware.
The Java to Oberon Compiler (JOB) was written at the University of Vologda in Russia.
Some JOB-specific classes are provided which are Java compatible, but which use a more Oberon-like component hierarchy.
It contains an optimizing compiler for Intel Pentium, or "via-C" translator for cross-platform software development.