<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Levente,</p>
<p><br>
</p>
<p>actually, I love the Dictionary API with the #ifPresent:ifAbsent: arguments as it is very convenient for describing the code paths (IMHO). As you may have seen, I am trying to establish it for more domains (see <span>Collections-ct.873, <span>Collections-ct.872, <span>Collections-ct.875).</span></span></span></p>
<p><br>
</p>
<div id="x_Signature">
<div dir="ltr" id="x_divtagdefaultwrapper" 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="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div id="x_Item.MessagePartBody" class="x__rp_T4">If you think it is important to distinguish between classes and globals, maybe we should also introduce #classNamed:[ifPresent:][ifAbsent:] (three variants) to SmalltalkImage? But this would be a lot of "forwarding
 noise".
<div id="x_Item.MessageUniqueBody" class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
<div id="x_Item.MessagePartBody" class="x__rp_T4"><br>
</div>
<div id="x_Item.MessagePartBody" class="x__rp_T4">Best,</div>
<div id="x_Item.MessagePartBody" class="x__rp_T4">Christoph</div>
</div>
<div><font color="#808080" size="2"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Levente Uzonyi <leves@caesar.elte.hu><br>
<b>Gesendet:</b> Sonntag, 16. Februar 2020 22:39:13<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Compiler-ct.418.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Christoph,<br>
<br>
The idea with Environments was to move away from the SystemDictionary API. <br>
It obviously didn't happen, but there's #classNamed: for class lookup by <br>
name. Actually #classNamed: was there with SystemDictionary too, but it <br>
was and still is underused.<br>
<br>
Levente<br>
<br>
On Sun, 16 Feb 2020, commits@source.squeak.org wrote:<br>
<br>
> Christoph Thiede uploaded a new version of Compiler to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/Compiler-ct.418.mcz">http://source.squeak.org/inbox/Compiler-ct.418.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Compiler-ct.418<br>
> Author: ct<br>
> Time: 16 February 2020, 3:49:08.315 pm<br>
> UUID: 3ca7ba74-6e8b-f64d-bc62-701ebc5df3e0<br>
> Ancestors: Compiler-eem.416<br>
><br>
> Small refactoring: Use SmalltalkImage >> #at:ifPresent:ifAbsent:.<br>
><br>
> =============== Diff against Compiler-eem.416 ===============<br>
><br>
> Item was changed:<br>
>  ----- Method: Compiler>>evaluateCue:ifFail: (in category 'private') -----<br>
>  evaluateCue: aCue ifFail: failBlock<br>
>        "Compiles the cue source into a parse tree, then generates code into<br>
>        a method. Finally, the compiled method is invoked from here via  withArgs:executeMethod:, hence the system no longer creates Doit method<br>
>        litter on errors."<br>
><br>
>        | methodNode method value |<br>
>        methodNode := self compileCue: aCue noPattern: true ifFail: [^failBlock value].<br>
><br>
>        method := self interactive<br>
>                                ifTrue: [methodNode generateWithTempNames]<br>
>                                ifFalse: [methodNode generate].<br>
><br>
>        value := cue receiver<br>
>                                withArgs: (cue context ifNil: [#()] ifNotNil: [{cue context}])<br>
>                                executeMethod: method.<br>
> +      ^ value!<br>
> -      ^ value<br>
> - !<br>
><br>
> Item was changed:<br>
>  ----- Method: MethodNode>>asColorizedSmalltalk80Text (in category 'converting') -----<br>
>  asColorizedSmalltalk80Text<br>
>        "Answer a colorized Smalltalk-80-syntax string description of the parse tree whose root is the receiver."<br>
><br>
>        | printText |<br>
>        printText := self printString asText.<br>
> +      ^ Smalltalk<br>
> +              at: #SHTextStylerST80<br>
> +              ifPresent: [:stylerClass | stylerClass new styledTextFor: printText]<br>
> +              ifAbsent: [printText]!<br>
> -      ^(Smalltalk at: #SHTextStylerST80 ifAbsent: [nil])<br>
> -              ifNotNil: [:stylerClass| stylerClass new styledTextFor: printText]<br>
> -              ifNil: [printText]!<br>
<br>
</div>
</span></font>
</body>
</html>