<div dir="ltr"><div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>> schrieb am Mi., 21. März 2018, 00:04:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 20 Mar 2018, Jakob Reschke wrote:<br>
<br>
> Note that the following also results in ClassBinding:<br>
> Smalltalk globals at: #Foo put: ProtoObject.<br>
> (Smalltalk globals associationAt: #Foo) class<br>
><br>
> ...so distinguishing globals that are classes from proper classes is<br>
> not that easy.<br>
<br>
Well, that's because #at:put: is the legacy API that should have been<br>
removed by now. But we're still very far from that, because there are so<br>
many questions to answer.<br></blockquote></div></div><div dir="auto"><br></div><div>#at:put: currently just delegates to #bind:to:, which is not legacy API. The method where ClassBinding enters the picture is Symbol>>#=>. Maybe the decision whether to create a class binding or a global variable binding would have to be determined at another place (not by the environment), such as ClassBuilder>>#name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe: (not only the selector is huge in this one...).</div><div><br></div><div>But then again, checking whether a binding is the "home" binding of a class can also be done via binding key == class name and: [bindingsEnvironment == class environment], as written before. This does not rely on the type of the binding object, which I find more appealing.</div><div><br></div><div>Kind regards,</div><div>Jakob</div></div></div>