<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>could you maybe share some more details about this particular design goal of Newspeak? :-)</p>
<p><br>
</p>
<p>At the first glance, I do not really see the advantages of moving more and more "global getters" to Object. It:</p>
<p>- inflates the Object protocol even more</p>
<p>- might imply that there is some connection between the receiver and the project, or at least hide the global state (which one also could call "code perfuming" :-))</p>
<p>- and I don't see how it could help to replace the global object at all - you still need to wrap relevant calls with #<span>becomeActiveDuring:, or speaking more in general about the proposed idiom, you would still need something like method wrappers unless
 you only want to override #currentThing for a single instance.</span></p>
<p><span><br>
</span></p>
<p><span>So what possible advantages am I missing right now? :)</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Dienstag, 2. März 2021 10:03:02<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> [squeak-dev] What about "self currentProject"?</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi all!
<div class="mb_sig"></div>
<div><br>
</div>
<div>After typing "Project current" for the n-th time, I was wondering, whether "self currentProject" could be a nice little idiom for the Squeak environment. </div>
<div><br>
</div>
<div>We had several thoughts on this matter:</div>
<div><a href="http://forum.world.st/Object-gt-gt-currentProjectWorld-td5044161.html#a5045072"><span style="font-size: 10pt">http://forum.world.st/Object-gt-gt-currentProjectWorld-td5044161.html#a5045072</span></a><br>
</div>
<div><a href="http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-tp5121690p5123334.html"><span style="font-size: 10pt">http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-tp5121690p5123334.html</span></a><br>
</div>
<div><span style="font-size: 13.3333px"><br>
</span></div>
<div>1. Object >> #currentProject would be a *System extension in Object to not be dependent on Morphic.</div>
<div>2.  "Project current world" could be replaced with "self currentProject world" (generic) or "self currentWorld" (specific to Morphic).</div>
<div>3. "Project uiManager" could be replaced with "self currentProject uiManager".</div>
<div>4. "Project current addDeferredUIMessage:" could be replaced with "self currentProject addDeferredUIMessage:".</div>
<div><br>
</div>
<div>So, we wouldn't have so many class references to "Project" in the code. It kind of reminds me about some of Newspeak's design goals. :-)</div>
<div><br>
</div>
<div>What do you think?</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
</div>
</div>
</body>
</html>