<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Serge<br>
<br>
Inspired by your email and driven by my interest in value semantics
in Active Oberon, I have now experimentally added type-bound
procedures on records in Active Oberon supporting polymorphism etc,
i.e. Oberon-2 within Active Oberon. <br>
<br>
We have to experiment and identify how this works together with
Active Objects. Feedback welcome.<br>
<br>
Best regards<br>
Felix<br>
<br>
The following works, for example<br>
<br>
MODULE Test;<br>
<br>
TYPE <br>
R* = RECORD Y,X*: LONGINT; END;<br>
S* = RECORD(R) Z: LONGINT; END;<br>
<br>
PROCEDURE (VAR r: R) Test* (x: LONGINT): LONGINT;<br>
BEGIN<br>
TRACE(r.X,.r.Y);<br>
RETURN r.X + x + r.Y; <br>
END Test; <br>
<br>
PROCEDURE (VAR s: S) Test (x: LONGINT): LONGINT;<br>
BEGIN<br>
TRACE(s.X. s.Y, s.Z);<br>
RETURN s.X + 2*x; <br>
END Test; <br>
<br>
PROCEDURE TestDyn*(VAR r: R);<br>
BEGIN<br>
TRACE(r.Test(10));<br>
END TestDyn;<br>
<br>
PROCEDURE Test*;<br>
VAR r: R; s: S; z, zz: LONGINT;<br>
BEGIN<br>
r.X := 123;<br>
TestDyn(r);<br>
TestDyn(s);<br>
END Test;<br>
<br>
END Test.<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 26.10.2016 14:10, Serge Durmanov
wrote:<br>
</div>
<blockquote cite="mid:4431781477483859@web20m.yandex.ru" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div> </div>
<div> </div>
<div>27.09.2016, 23:11, "Felix Friedrich"
<a class="moz-txt-link-rfc2396E" href="mailto:felix.friedrich@inf.ethz.ch"><felix.friedrich@inf.ethz.ch></a>:</div>
<div>...</div>
<div>> Let me first of all confess that I like Oberon-2 a lot.
I always thought</div>
<div>> it would be a good idea to reintroduce the type bound
procedures on</div>
<div>> value types in Active Oberon. [Most important difference
to Active</div>
<div>> Oberon in this context: methods can be defined outside
the scope of an</div>
<div>> object, methods can be defined on records, not only
pointer to records.]</div>
<div>>...
<div>Hi, Felix.</div>
<div> </div>
<div>
<div>Hi, Felix.</div>
<div>Are there any changes to the language in this plan?</div>
<div>We need not reference types that have the methods that
adds to the convenience in the design and simplifies the
code. I did the porting on the Active Oberon AGG lib, and
lacked methods on the records, and I make a separate module
(one record type - one module), but it is not convenient and
not possible to do polymorphism. I go back to classic Oberon
and use procedural variables in records. But ...it is the
sundown manually</div>
</div>
</div>
<div> </div>
<div>Serge</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
<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
<a class="moz-txt-link-freetext" href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a>
</pre>
</blockquote>
<br>
</body>
</html>