<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</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>Hm, maybe we will never now - the crux of ternary logic ;-)</p>
<p><br>
</p>
<p>But actually, I wonder whether any of these calls to "something class canUnderstand: aSelector" is useful, shouldn't we rather replace a big part of them with "something respondsTo: aSelector"?</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>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="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>
<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 Jakob Reschke <forums.jakob@resfarm.de><br>
<b>Gesendet:</b> Freitag, 31. Januar 2020 18:23:19<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Should you override #doesNotUnderstand: and #respondsTo: together?</font>
<div> </div>
</div>
<div>
<div dir="auto">*maybe* it was also a joke :-)</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> schrieb am Fr., 31. Jan. 2020, 18:22:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_3592583892095674379divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p>When would you use this third boolean concretely? To me, this sounds rather like an overengineering solution, maybe premature optimization, for now ... :-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="m_3592583892095674379Signature">
<div id="m_3592583892095674379divtagdefaultwrapper" 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="m_3592583892095674379Item.MessagePartBody">
<div id="m_3592583892095674379Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="m_3592583892095674379divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="m_3592583892095674379Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_3592583892095674379divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank" rel="noreferrer">squeak-dev-bounces@lists.squeakfoundation.org</a>>
 im Auftrag von Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de" target="_blank" rel="noreferrer">forums.jakob@resfarm.de</a>><br>
<b>Gesendet:</b> Freitag, 31. Januar 2020 18:16:51<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Should you override #doesNotUnderstand: and #respondsTo: together?</font>
<div> </div>
</div>
<div>
<div dir="auto">Regarding canUnderstand:, maybe it's time for the third boolean called "it depends" or "maybe". ;-)</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de" target="_blank" rel="noreferrer">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> schrieb am Fr., 31. Jan. 2020, 10:43:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">
<div id="m_3592583892095674379m_-2230043140418705437x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif">
<p>> <span>Question is, should X class>>canUnderstand: be overwritten, too?</span></p>
<p><span><br>
</span></p>
<p><span>This would not be possible in my example, would it? Each json object understands different keys ... This is also why I favor #respondsTo: over #canUnderstand: in general.</span></p>
<p><span><br>
</span></p>
<p>Best,</p>
<p>Christoph</p>
<div id="m_3592583892095674379m_-2230043140418705437x_Signature">
<div id="m_3592583892095674379m_-2230043140418705437x_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="x_divtagdefaultwrapper">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_3592583892095674379m_-2230043140418705437x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" rel="noreferrer noreferrer" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>>
 im Auftrag von Tobias Pape <<a href="mailto:Das.Linux@gmx.de" rel="noreferrer noreferrer" target="_blank">Das.Linux@gmx.de</a>><br>
<b>Gesendet:</b> Freitag, 31. Januar 2020 10:30:20<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Should you override #doesNotUnderstand: and #respondsTo: together?</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div><br>
> On 31.01.2020, at 10:14, Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de" rel="noreferrer noreferrer" target="_blank">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br>
> <br>
> Hi all,<br>
> <br>
> just struggled over the fact that Json objects provide access to their keys via #doesNotUnderstand:, but they do not override #respondsTo:. Example:<br>
> <br>
> json := Json readFromString: '{"foo": 42}'.<br>
> json foo. "42"<br>
> json respondsTo: #foo. "false"<br>
> <br>
> Question: Is this discrepancy indeed desired behavior? Or should we rather always try to override #doesNotUnderstand: and #respondsTo: together?<br>
<br>
This is actually done very seldom, IIRC.<br>
But maybe a good pattern, tho. Question is, should X class>>canUnderstand: be overwritten, too?<br>
<br>
Best regards<br>
        -Tobias<br>
<br>
> <br>
> Best,<br>
> Christoph<br>
<br>
<br>
<br>
</div>
</span></font></div>
<br>
</blockquote>
</div>
</div>
</div>
<br>
</blockquote>
</div>
</div>
</body>
</html>