[Oberon] Oberon for a C++ user.
Diego Sardina
dsar at eml.cc
Wed Nov 16 08:12:22 CET 2016
> It is not meaningless, it stresses the fact that you are not extending an existing method, and affirmatively states that in the source text.
Again, in a final record that *extends no record*
OF COURSE I'm not extending an existing method
and being final it is not going to be a base.
The purpose of NEW is meaningless here.
I'm not stating that in a type hierarchy it is
useless. It is just that particular case that
I find the NEW keyword invasive.
But I understand that removing it only for this
special case would complicate language semantics.
> If at a later point you change the RECORD definition to become an extension of a more generic object, the compiler will help you resolve the method name conflicts.
Why I have to change record definition to be an
extension of a more generic object? That means
there was something wrong in my design decisions.
There is also a lot of work, i.e. implementing
all the mandatory part of the interface.
NEW keyword of course helps here in the case of
clashing names, but putting an independent type
into a type hierarchy is easier to state than
to do. In most cases, it requires a re-design
--
Diego Sardina
More information about the Oberon
mailing list