<div dir="ltr"><div style="font-size:13px">I&#39;m trying to work through an anomaly in our VA Smalltalk Seaside implementation and it seems to boil down to a difference between Pharo and VA Smalltalk in when the class-side #initialize methods are run.</div><div style="font-size:13px"> * On Pharo, they are only run if the source for the #initialize method that is being loaded does not match the source of the #initialize method that was previously loaded (which is, of course, nil if the method does not already exist in the image)</div><div style="font-size:13px"> * On VA Smalltalk, they are always run when an Application is loaded</div><div style="font-size:13px"><br></div><div style="font-size:13px"><div>Pharo&#39;s approach seems designed for #initialize methods with simple setter methods (like classVarA := 7). However, since the &#39;source code matching&#39; doesn&#39;t recursively match the source code of methods being called from #initialize, nor is there any guarantee that called methods will always return the same thing even if their source hasn&#39;t changed, this seems like a flawed optimization to me (at least when complex #initialize methods are involved). But since it is what Pharo provides, I guess it is what you use.</div><div><br></div><div>I also see this sort of code in several methods called from #initialize:</div><div><br></div><div> configureApplicationDefaults</div><div>    (configuredApplicationDefaults ifNil: [ false ]) ifFalse: [</div><div><span style="white-space:pre-wrap">       </span>WAAdmin applicationDefaults</div><div><span style="white-space:pre-wrap">          </span>at: #responseGenerator put: WAHtmlResponseGenerator.</div><div>       configuredApplicationDefaults := true ] </div></div><div style="font-size:13px"><br></div><div style="font-size:13px">This <i>seems</i> to be a guard against the VA Smalltalk style of class initialization.</div><div style="font-size:13px"><br></div><div style="font-size:13px">Can someone with a deeper understanding of the workings of Pharo than I have confirm that this is what is happening? </div><div style="font-size:13px"><br></div><div style="font-size:13px">Thanks, John</div><div><br></div><div><a href="mailto:john_okeefe@instantiations.com" target="_blank">john_okeefe@instantiations.com</a><br><a href="http://www.instantiations.com/" target="_blank">http://www.instantiations.com</a><br></div>
</div>