[Oberon] List of extensions for Project Oberon compiler

Chris Burrows chris at cfbsoftware.com
Mon Feb 1 05:24:20 CET 2021

> -----Original Message-----
> From: Skulski, Wojciech [mailto:skulski at pas.rochester.edu]
> Sent: Monday, 1 February 2021 10:48 AM
> To: chris at cfbsoftware.com; ETH Oberon and related systems
> Subject: Re: [Oberon] List of extensions for Project Oberon compiler
> Chris:
> >One of things on my possible 'list of things to do' is to produce a
> >version of Project Oberon that is 100% compliant with the Language
> >Report. I believe that is eminently feasible.
> >If you have a similar ambition then I would be happy to collaborate
> >with you.
> There can be two approaches to language definition and
> implementation.
> 1) Define the language the way it should be. Be surprised why there
> are no users and no useful applications.
> 2) Look at the applications, ask the users of previous versions,
> extract the advice from the community, and cautiously implement
> modifications which improve the language and also minimize the
> damage.

Good point. There is one undocumented extension that I do find useful in
low-level device drivers for example. That is the use of a type declared as
ARRAY n OF BYTE as a formal parameter that maps onto actual parameters with
a range of data types. It is similar to the use of ARRAY OF SYSTEM.BYTE in
Oberon for the NS32000 but it is slightly safer in that it is restricted to
data types with the same number of bytes. However, I can understand it not
being included in the language Report as it is effectively a non-SYSTEM
loophole which undermines type safety.

Similar effectiveness could be achieved without altering the language by
allowing SYSTEM.VAL to apply to non-scalar data types. The use of SYSTEM.VAL
would highlight that it is non-portable. I would be interested to hear any
feedback on this proposal. 


  Word = ARRAY 4 OF BYTE;

  i: INTEGER; b0, b1, b2, b3: BYTE; w: WORD;
  w := SYSTEM.VAL(Word, i);
  b2 := w[2];

Chris Burrows
CFB Software

More information about the Oberon mailing list