[Oberon] Oberon for a C++ user.

Diego Sardina dsar at eml.cc
Sun Nov 13 20:41:15 CET 2016


> I am of the opinion that Component Pacal *should*
> just become the official Oberon of the future.
>
> Wojtek

Oberon is just Oberon and Component Pascal is just
Component Pascal :-)

I don't like all those extravagant keywords and it's
not true that *a pure client programmer never needs
to write any of above attributes* as the What's New
document states.

For example: I just want a final record, that extends
no record, with some type-bound procedures, for a
very simple use-case.

TYPE
   MyFinalRec = RECORD
     [...]
   END;

PROCEDURE (VAR m : MyFinalRec) Method(), NEW;
BEGIN
   [...]
END Method;

I'm forced to use the NEW keyword, due to the fact
that Method() is newly introduced.
But it is meaningless for a final record that does
not extend a record.

To make it disappear, I have to make an interface
for that record like this:

TYPE
   IMyFinalRec = ABSTRACT RECORD END;

PROCEDURE (VAR m : IMyFinalRec) Method(), NEW, ABSTRACT;


Extending this record (or in an alternative form:
implementing this interface) the NEW keyword will
disappear (of course).

Now I'm a pure client programmer, but before I had
to be a software designer :-)

Except for some minor points like the above one, I
have to say that I like Component Pascal and it's
a pity that they did not include Szyperski's work
on (a lightweight) Parametric Polymorphism.

Anyway I tend to like more Oberon/Oberon-2 than CP,
software design is a very important discipline but
it is not everything.


--
Diego Sardina



More information about the Oberon mailing list