<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.800000190734863px">If I understand this right, this means that you would evaluate the inherit expression in the same way as in a normal request.</span></blockquote><div><br></div><div>Yes, my intention was to see if we could treat inheritance expressions as normal requests - as you indicated doing so leads to double initialization and, consequently, perhaps unexpected side effects. Lesson learned :)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 10, 2018 at 9:59 AM, Prof. Andrew P. Black <span dir="ltr"><<a href="mailto:black@cs.pdx.edu" target="_blank">black@cs.pdx.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Richard,<br>
<br>
I think that the flaw in your translation is here:<br>
<span class=""><br>
<br>
> On 29 Nov 2017, at 11:29 , Richard Roberts <<a href="mailto:rykardo.r@gmail.com">rykardo.r@gmail.com</a>> wrote:<br>
><br>
<br>
> if no inherit expression declared,<br>
> 1 - make a fresh object<br>
> else<br>
> 1 - call inherit expression (if found).<br>
> 1.1 invoke the request declared in the inheritance clause<br>
> 1.2 assign the object to self.<br>
<br>
<br>
</span>If I understand this right, this means that you would evaluate the inherit expression in the same way as in a normal request. This includes executing the initialization, which might execute methods that will be overridden by traits or by new definitions in the object constructor.<br>
<br>
Then, in step 3 you execute the initialization again, this time with the correct overriding. This might overwrite any bad initialization done by the earlier initialization, but since the initialization code can have arbitrary effects (like, for example, printing stuff), the double initialization would be visible.<br>
<span class="HOEnZb"><font color="#888888"><br>
Andrew<br>
<br>
</font></span></blockquote></div><br></div>