<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="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;" dir="ltr">
<p>> <span style="font-size: 12pt;">But I doubt that's what Christoph </span><span style="font-size: 12pt;">would like to have.</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">That is right, I was assuming some kind of late-binding prototypical object model.</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;">For instance, a similar model seems to be used for JavaScript objects:</span></p>
<p><span style="font-size: 12pt;"><br>
</span></p>
<p><span style="font-size: 12pt;"></span></p>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div 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;" dir="ltr">
<div></div>
</div>
<div>> x = {}</div>
<div>{}</div>
<div>> x.foo</div>
<div>undefined</div>
<div>> <span style="font-size: 12pt;">x.hasOwnProperty('foo')</span>
<div>false</div>
</div>
<div>> x.foo = 42</div>
<div>42</div>
<div>> x.foo</div>
<div>42</div>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
> <span style="font-size: 12pt;">x.hasOwnProperty('foo')</span>
<div>true</div>
</div>
</div>
<div 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;" dir="ltr">
<div></div>
</div>
</blockquote>
<div 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;" dir="ltr">
<br>
<p></p>
<p>However, I see your concerns, Levente ... My proposal would violate the contract "if and only if #respondsTo: returns true, sending the message will not cause a MNU", if there was any contract like. But do we need logical equivalency for such a contract
 or would simple causality ("if <span>#respondsTo: returns true, then sending the message will not cause a MNU") suffice? Hm ...</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<br>
<div style="color: rgb(0, 0, 0);">
<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> Montag, 9. November 2020 15:17 Uhr<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] I'd like to contribute to the JSON project</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Marcel,<br>
<br>
On Mon, 9 Nov 2020, Marcel Taeumel wrote:<br>
<br>
> Hi Levente.<br>
> Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash.<br>
<br>
In that case JsonObject >> #respondsTo: should return true for all unary <br>
and one-argument keyword selectors. But I doubt that's what Christoph <br>
would like to have.<br>
<br>
<br>
Levente<br>
<br>
> <br>
> I did not know about #dictionaryClass:. That's a powerful hook.<br>
> <br>
> Best,<br>
> Marcel<br>
><br>
>       Am 09.11.2020 03:07:54 schrieb Levente Uzonyi <leves@caesar.elte.hu>:<br>
><br>
>       Hi Christoph,<br>
><br>
>       On Sun, 8 Nov 2020, Christoph Thiede wrote:<br>
><br>
>       > Hi Levente,<br>
>       ><br>
>       > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be<br>
>       > great because I depend on this functionality in another project and<br>
>       > currently require your JSON fork in my baseline. :-)<br>
><br>
>       I cannot merge it because that would bring back long removed methods, and<br>
>       MC wouldn't allow me to reject those.<br>
>       But I can add the changes manually.<br>
>       If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:.<br>
><br>
>       What is the purpose of that method?<br>
>       I'm asking because it has got no comment, so I'm not sure its<br>
>       implementation is correct.<br>
>       For example, should<br>
><br>
>       JsonObject new respondsTo: #foo:<br>
><br>
>       return false?<br>
>       What should the following return?<br>
><br>
>       JsonObject new<br>
>       foo: 1;<br>
>       respondsTo: #foo:<br>
><br>
>       Another question is whether it is generally useful or not?<br>
>       If it's not, you can still have the desired behavior by creating a<br>
>       subclass. E.g.:<br>
><br>
>       JsonObject subclass: #PseudoObject<br>
>       instanceVariableNames: ''<br>
>       classVariableNames: ''<br>
>       poolDictionaries: ''<br>
>       category: 'PseudoObject'<br>
> <br>
><br>
>       PseudoObject >> respondsTo: aSymbol<br>
><br>
>       ^ (super respondsTo: aSymbol)<br>
>       or: [self includesKey: aSymbol]<br>
> <br>
><br>
>       (Json new<br>
>       dictionaryClass: PseudoObject;<br>
>       readFrom: '{"foo": 42}' readStream)<br>
>       respondsTo: #foo<br>
>       "==> true"<br>
> <br>
><br>
>       Levente<br>
><br>
>       ><br>
>       > Best,<br>
>       > Christoph<br>
>       ><br>
>       ><br>
>       ><br>
>       > --<br>
>       > Sent from: <a href="http://forum.world.st/Squeak-Dev-f45488.html" id="LPlnk239233" previewremoved="true">
http://forum.world.st/Squeak-Dev-f45488.html</a>
<div id="LPBorder_GT_16049389541910.2398716581426361" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_16049389541850.335313982452629" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_16049389541860.8297252340738142" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_16049389541870.5128541006521667"></div>
<div id="LPTitle_16049389541870.7678241225412699" style="top: 0px; color: rgb(36, 96, 118); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_16049389541870.6666755589856956" href="http://forum.world.st/Squeak-Dev-f45488.html" target="_blank" style="text-decoration: none;">Smalltalk - Squeak - Dev | Mailing List Archive</a></div>
<div id="LPMetadata_16049389541900.27002968411350703" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
forum.world.st</div>
<div id="LPDescription_16049389541910.21561382372162474" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Squeak - Dev forum and mailing list archive. The general-purpose Squeak developers list</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
> <br>
> <br>
><br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>