<div dir="ltr"><div>Hi <span>Christoph,</span></div><div><span><br></span></div><div><span>Just a side note concerning the code you linked: Is checking error for nil in line 15 necessary?</span></div><div><span><br></span></div><div><span>Balázs<br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 27, 2021 at 7:47 PM Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div id="gmail-m_-8310377942788556483divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>the proposal is in the title. :-) Do you think we could need something like #identityCaseOf:<span>[otherwise:]</span>, analogously to #caseOf:[otherwise:], on Object?</p>
<p><br>
</p>
<p>Here is my motivation: I very often use #caseOf:[otherwise:] to eliminate nested if blocks (for one of many examples, take a look at PreferenceBrowserMorph >> #<span>keyPressed:). In one recent situation [1], however, I confused equality and identity (I
 have to admit that this is a common error of mines) so I had to convert my beautiful #caseOf: statement back to a boring list of if checks. I wonder whether we could - or should - introduce something like #identityCaseOf:otherwise: (names subjected to discussion)
 for such situations?</span></p>
<p><span><br>
</span></p>
<p><span>Historically, I guess this has not been built because #caseOf: has probably been inspired by the switch/select/case statement of other languages, which usually only accept constant case values. But in Smalltalk, luckily, we do not have this restriction,
 thus I'm wondering whether there is any reason to have #caseOf: but not #identityCaseOf:. Looking forward to your opinions! :-)</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="gmail-m_-8310377942788556483Signature">
<div id="gmail-m_-8310377942788556483divtagdefaultwrapper" 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">
<div>
<div id="gmail-m_-8310377942788556483Item.MessagePartBody">
<div id="gmail-m_-8310377942788556483Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="gmail-m_-8310377942788556483divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="gmail-m_-8310377942788556483Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" rel="noopener noreferrer" id="gmail-m_-8310377942788556483LPNoLP" target="_blank"><font size="2"><span id="gmail-m_-8310377942788556483LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
<div id="gmail-m_-8310377942788556483Item.MessagePartBody"><br>
</div>
<div id="gmail-m_-8310377942788556483Item.MessagePartBody">[1] <a href="https://github.com/LinqLover/SimulationStudio/commit/ddf0ef3e21c63a2fd9b08703c8e9ff213b7b6b0b" id="gmail-m_-8310377942788556483LPlnk266987" target="_blank">https://github.com/LinqLover/SimulationStudio/commit/ddf0ef3e21c63a2fd9b08703c8e9ff213b7b6b0b</a></div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</div>

<br>
</blockquote></div>