<br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 7:57 PM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 7/22/2010 6:26 PM, Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The VW implementation relies on &quot;clean<br>
blocks&quot; where the compiler creates a literal block provided the block<br>
doesn&#39;t reference its outer environment.<br>
</blockquote>
<br></div>
I see. Sounds like a hack :-) What&#39;s wrong with the straightforward:<br>
<br>
someResource<br>
        ^SomeResource ifNil:[self initializeSomeResource]<br>
<br>
? It explicitly documents that there is a shared resource by naming it which is a good thing in my understanding.<br></blockquote><div><br></div><div>What&#39;s &quot;wrong&quot;, or at least not as nice, is the variable and its declaration.   The [expr] once form is entirely self-contained whereas the SomeResource ifNil: [self initializeResource] is accompanied with a variable declaration somewhere else.  I also like (but haven&#39;t seen used) the notion of having variations on once such as onceInEverySession which can again provide the necessary void-on-startup hook without any explicit registering in a start-up list.</div>
<div><br></div><div>I do take your point about it being a hack, but its a neat hack.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Cheers,<br><font color="#888888">
  - Andreas</font></blockquote><div><br></div><div>best</div><div>Eliot </div></div>