<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
From the Component Pascal documentation<br>
"10.4 Finalization<br>
<br>
A predeclared method named FINALIZE is associated with each record
type as if it were declared to be bound to the type ANYREC:<br>
<br>
PROCEDURE (a: ANYPTR) FINALIZE-, NEW, EMPTY;<br>
<br>
The FINALIZE procedure can be implemented for any pointer type. The
method is called at some unspecified time after an object of that
type (or a base type of it) has become unreachable via other
pointers (not globally anchored anymore) and before the object is
deallocated.<br>
It is not recommended to re-anchor an object in its finalizer and
the finalizer is not called again when the object repeatedly becomes
unreachable. Multiple unreachable objects are finalized in an
unspecified order.<br>
"<br>
<br>
<div class="moz-cite-prefix">On 11/13/2016 11:41 AM, Diego Sardina
wrote:<br>
</div>
<blockquote cite="mid:8767f2ae-3b60-6acc-d7af-bb4ea0e25ed6@eml.cc"
type="cite">
<blockquote type="cite">I am of the opinion that Component Pacal
*should*
<br>
just become the official Oberon of the future.
<br>
<br>
Wojtek
<br>
</blockquote>
<br>
Oberon is just Oberon and Component Pascal is just
<br>
Component Pascal :-)
<br>
<br>
I don't like all those extravagant keywords and it's
<br>
not true that *a pure client programmer never needs
<br>
to write any of above attributes* as the What's New
<br>
document states.
<br>
<br>
For example: I just want a final record, that extends
<br>
no record, with some type-bound procedures, for a
<br>
very simple use-case.
<br>
<br>
TYPE
<br>
MyFinalRec = RECORD
<br>
[...]
<br>
END;
<br>
<br>
PROCEDURE (VAR m : MyFinalRec) Method(), NEW;
<br>
BEGIN
<br>
[...]
<br>
END Method;
<br>
<br>
I'm forced to use the NEW keyword, due to the fact
<br>
that Method() is newly introduced.
<br>
But it is meaningless for a final record that does
<br>
not extend a record.
<br>
<br>
To make it disappear, I have to make an interface
<br>
for that record like this:
<br>
<br>
TYPE
<br>
IMyFinalRec = ABSTRACT RECORD END;
<br>
<br>
PROCEDURE (VAR m : IMyFinalRec) Method(), NEW, ABSTRACT;
<br>
<br>
<br>
Extending this record (or in an alternative form:
<br>
implementing this interface) the NEW keyword will
<br>
disappear (of course).
<br>
<br>
Now I'm a pure client programmer, but before I had
<br>
to be a software designer :-)
<br>
<br>
Except for some minor points like the above one, I
<br>
have to say that I like Component Pascal and it's
<br>
a pity that they did not include Szyperski's work
<br>
on (a lightweight) Parametric Polymorphism.
<br>
<br>
Anyway I tend to like more Oberon/Oberon-2 than CP,
<br>
software design is a very important discipline but
<br>
it is not everything.
<br>
<br>
<br>
--
<br>
Diego Sardina
<br>
<br>
--
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related
systems
<br>
<a class="moz-txt-link-freetext" href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>