<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><br>On Apr 4, 2017, at 7:02 AM, Bert Freudenberg <<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 4, 2017 at 3:47 PM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Levente,<br>
<br>
> On Apr 3, 2017, at 11:14 AM, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>> wrote:<br>
><br>
> <span class="m_-8719196316742174166gmail-"> The correct solution is:<br>
><br>
> Array streamContents: [ :stream |<br>
>    Smalltalk globals associationsDo: [ :binding |<br>
>        binding class == Global ifTrue: [ stream nextPut: binding ] ] ].<br></span></blockquote><div><br></div><div>Or shorter </div><div><br></div><div>    Smalltalk globals declarations select: #canAssign<br></div><div><br></div><div>maybe? Unlike class bindings, global vars are writable.</div></div></div></div></div></blockquote><div><br></div>I don't like this.  I see writability as orthogonal.  I'm sure there's good uses for read-only globals that are not classes.  I like the tenseness though.  So<div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">    Smalltalk globals declarations reject: #isClassBinding</span></div><div><br></div><div>with</div><div>isClassBinding ^value isBehavior and: [key == value name]<br><div><br><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-8719196316742174166gmail-">
</span>Why not<br>
<span class="m_-8719196316742174166gmail-"><br>
Array streamContents: [ :stream |<br>
   Smalltalk globals associationsDo: [ :binding |<br>
</span>       (binding class == Global<br>
       and: [ binding value isBehavior<br>
       and: [ binding key == binding value name ] ]) ifTrue:<br>
            [ stream nextPut: binding ] ] ].<br></blockquote><div><br></div><div>Because we want to know the global *variables*, that is everything *but* the class bindings. So we look for instances of Global, not ClassBinding, no matter the value.</div></div></div></div></div></blockquote><div><br></div>Forgive me; I missed a not in there.  But my point is that the classes in global are in bindings whose keys are == to their name.  Everything else is a global variable.</div><div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-8719196316742174166gmail-">> The role of declarations and bindings is still not clear in Environments, therefore, as I wrote it before, unrelated to tool support, I still consider Environments to be incomplete.<br></span></blockquote><div><br></div><div>I thought 'declarations' are the things owned by this environment (excluding imports), whereas 'bindings' are the things visible in this environment (including imports).</div></div></div></div></div></blockquote><div><br></div>Is there a definition in text somewhere?  Colin?</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>- Bert -</div></div></div></div></blockquote></div></div></div></body></html>