[Oberon] [EXT] Re: Potential New Approach to Implement Instance-Centered OOP in Oberon-07

Chris Burrows cfbsoftware at gmail.com
Tue Oct 13 02:03:51 CEST 2026


Hi August,

I sent the following email to Niklaus Wirth (cc Paul Reed) on 13 March 2017:

"The Project Oberon RISC5 compiler reports the error ‘invalid extension’
for the following type declaration of P1. I found it used as an example in
Section 26.1 *Record and Pointer Types* of the document *An Oberon Compiler
for the ARM Processor*:



TYPE

   P0 = POINTER TO RECORD a, b: INTEGER END;

  P1 = POINTER TO RECORD (P0) c, d: INTEGER END;



Is this a restriction specific to the Project Oberon RISC5 compiler or does
the latest revision of the language not allow this abbreviation?



It would not particularly concern me if it is no longer allowed. I prefer
to avoid the use of anonymous types and would most likely have written:



TYPE

  P0 = POINTER TO R0;

  P1 = POINTER TO R1;

  R0 = RECORD a, b: INTEGER END;

  R1 = RECORD (R0) c, d: INTEGER END;



I also note that the recent Oberon-related documentation predominantly uses
this latter style"


His reply dated 13 Mar 2017 was:


"You are right. The identifier R0 in

     RECORD (R0) a, b: INTEGER END.

must be a record type, and cannot be a pointer type.

I had "simplified" this some long time ago, because pointer types in this
position caused severe troubles in combination with import/export., And I
think this "restriction" iis quite sensible. Unfortunately, the diagnostic
message is a bit obscure."


Regards,

Chris

--

Chris Burrows

CFB Software

https://www.astrobe.com



On Tue, Oct 13, 2026 at 4:39 AM August Karlstrom <fusionfile at gmail.com>
wrote:

> On 2026-10-11 23:01, Chris Burrows wrote:
> > Yes - that abbreviation was a feature of the Oberon ARM compiler that
> > didn't make it into the eventual official Oberon-07 Language Report.
>
> The language report says that "a record type can be defined as an
> extension of another record type" and "pointer types inherit the
> extension relation of their base types". I think the wording is
> intentionally slightly vague to allow for a pointer to be used as a
> record base type as described in the Oberon ARM compiler document.
>
> Has it been mentioned at some point that it "didn't make it into the
> eventual official Oberon-07 Language Report"?
>
>
> /August
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20261013/a2f26775/attachment.html>


More information about the Oberon mailing list