*** Welcome to piglix ***

Oberon-2

Oberon-2
OberonLogo.png
Paradigm imperative, structured, modular, object-oriented
Designed by Niklaus Wirth, Hanspeter Mössenböck
First appeared 1991
Typing discipline strong, static
Influenced by
Oberon, Modula-2, Pascal
Influenced
Component Pascal, Go

Oberon-2 is an extension of the original Oberon programming language that adds limited reflection and object-oriented programming facilities, open arrays as pointer base types, read-only field export and reintroduces the FOR loop from Modula-2.

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. Oberon-2 is a superset of Oberon, and is fully compatible with it. Oberon-2 was a redesign of Object Oberon.

Oberon-2 inherited limited reflection and single inheritance ("type extension") without interfaces or mixins from Oberon, but added efficient virtual methods ("type bound procedures"). Method calls were resolved at run-time using C++-style virtual method tables.

Compared to fully object-oriented programming languages like Smalltalk, in Oberon-2 basic types are not objects, classes are not objects, many operations are not methods, there is no message passing (to a certain extent it can be emulated by reflection and through message extension, as demonstrated in ETH Oberon), and polymorphism is limited to subclasses of a common class (no duck typing like in Python, and it's not possible to define interfaces like in Java). Oberon-2 does not support encapsulation at object/class level, but modules can be used for this purpose.

Reflection in Oberon-2 does not use meta-objects, but simply reads from type descriptors compiled into the executable binaries, and exposed in the modules that define the types and/or procedures. If the format of these structures are exposed at the language level (as is the case for ETH Oberon, for example), reflection could be implemented at the library level. It could therefore be implemented almost entirely at library level, without changing the language code. Indeed, ETH Oberon makes use of language-level and library-level reflection capabilities extensively.


...
Wikipedia

...