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

August Karlstrom fusionfile at gmail.com
Mon Oct 12 20:16:44 CEST 2026


On 2026-10-12 18:06, Diego Sardina wrote:
> An interesting (implicit) feature of just having extensible records (and not pointers) is the ability to prevent extension outside module boundaries, having a sort of a *final* class (by using a modern terminology).
> 
> TYPE
>    Foo* = POINTER TO FooDesc
> 
>    FooDesc = RECORD ... END;
> 
> We can use instances of Foo but we can't extend FooDesc because it's not exported. We can't even allocate it (outside its declaring module) because the size of the record is not known (although it's exported for GC purposes, but that's a trick, for this reason implementations allow for NEW on those instances).
> 
> LIMITED records In Component Pascal exhibit exactly this behaviour. Indeed in Component Pascal they wanted to make it explicit with a keyword (even in the case you export the record or pointer, since you can extend a pointer directly in Component Pascal).
> 

That's indeed an interesting observation. Does the Project Oberon 
compiler handle non-exported records like this?

/August


More information about the Oberon mailing list