[Oberon] Re: ABSTRACT to EMPTY redefinition in Component Pascal

Josef Templ josef.templ at gmail.com
Wed Apr 11 16:36:23 CEST 2018

In practice, I think, there are not too many use cases for overriding an
ABSTRACT method by
an EMPTY method but it is possible to think of the following situation:

An ABSTRACT base type *Object *provides ABSTRACT methods *Store* and *Load*
for persisting the contents of an object.
A concrete sub-type must implement all methods but if there is nothing to
store resp. load, the implementation of *Store *and *Load *could be simply
marked EMPTY.

Note: In reality, storing and loading objects is usually more complicated
and an EMPTY
implementation may not be a good solution. For example, a version tag per
extension level
may be required for keeping persisted objects compatible when the storage
format or contents changes in later versions. In BlackBox this approach is
used throughout the framework.
See module *Stores*.

- Josef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20180411/7acda768/attachment.html>

More information about the Oberon mailing list