[Looking for a book logo 9.5KB]
Show me your interesting books!

Comparison of Oberon-2 with Modula-2

[modulAware.com/zel logo]

This is a short summary of the main features offered by the programming language Oberon-2. The target audience is the Modula-2 programmer unfamiliar with Oberon-2, but familiar with object-oriented and extensible programming concepts.

Compared with its predecessor Modula-2, Oberon-2 has increased expressiveness and safety. Oberon-2 also "adds simplicity", because there are

The latter saves a great deal of software maintenance, since the interface specification of a module is generated by a tool from the symbol file. Subranges and unsigned types in Modula-2 complicated the whole-number type compatibility rules without adding any important functionality. Program language design is a compromise and it is disputable, whether enumeration types increase readability or static program safety. This is an often discussed feature, but the least important. If the goal is to make a language as simple a possible and given that they do not add functionality, enumeration types are not required.

Oberon-2 main features

Persistent objects and meta-programming facilities are supported via a library module.

As an advantage over Modula-2, Oberon-2 features save pointers under the provision that SYSTEM.ADR and type casting SYSTEM.VAL is not used. All pointer variables, even when declared within a structured type, be it global, local, or heap are inititialised to NIL and there is no DISPOSE (although stand-alone implementation without garbage collector might allow to use Objects.DISPOSE).

Run-time check of a pointer type is done via so-called type descriptors and pointer type tags for both, static and dynamic objects.

Oberon-2 is simpler, but more powerful than Modula-2.

Recommended reading

Object Oriented Programming in Oberon-2 by H.P. Mössenböck, Springer Verlag, 1993; available in English and in German.


The Alignment Trap :: Navigator

[ The Alignment Trap Home | About The Alignment Trap | Oberon System and Compiler Implementations (OSCI) | Comparison of Oberon-2 with Modula-2 | From C/C++ to Oberon-2 | Oberon-2 Language Report | AlphaOberon-2 Compiler User's Guide | Download AlphaOberon for OpenVMS Alpha ]

modulAware.com home


Copyright (c) (1999-2011) by modulAware.com
Last revised 01-Mar-2011

Disclaimer: The banner advertisement at the top of this page is dynamically inserted by the web-site hosting service; The banner image content and the URL it refers to is outside the responsibility of modulAware.com