<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">> On </span><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Fri Oct 6 15:57:28 CEST 2017 August Karlstrom wrote:</span></font><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">> > On 2017-10-06 12:19, Andreas Pirklbauer wrote:
> > every procedure used as an actual parameter would have to be given an </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">explicit name</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">> ></span></div><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">><br class="Apple-interchange-newline">> I'm not sure what you mean here. Can you clarify?</span></font><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">It means that the *type* (i.e. the signature) of every procedure would need to get a *type name*, requiring a new syntax (am example is shown below). This was (rightly?) considered to be overkill when Oberon was designed, as most procedures are “standalone" procedures that are not later assigned to a procedure variables.</span></font></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> TYPE MyProc = PROCEDURE (x, y: INTEGER): INTEGER; (*defines a procedure type (signature)*)</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> VAR P: MyProcedure; (*declares procedure variable of the named procedure type ‘MyProc'*)</span></font></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> PROCEDURE Q: MyProc; (*implements the procedure type ‘MyProc'*)</span></font></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> VAR i, j: INTEGER;</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> BEGIN </span><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">…</span></font></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> END Q;</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> P := Q; (*assigns an implementation to a procedure variable*)</span></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">-AP</span></font></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">PS: If you are familiar with other strongly typed languages, you may have come across roughly similar constructs in other contexts. For example, in ‘Go’ there are ‘interface types’, or in Swift there are ‘protocols’ (to which classes are said to “conform”). Translated to our discussion one could say that “P conforms to signature MyProc” and “Q conforms to AND implements MyProc").</span></font></div><div class=""><br class=""></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div></div></body></html>