<div dir="ltr"><div><div>Since we are at reviewing Environment, here is a small detail that bothers me. I already asked some months ago, but silence was the only response, so ping.<br><br>Implementation of Environment is sometimes not obvious:<br><div>- Environment&gt;&gt;associationAt: uses declarations inst.var..<br></div><div>- Environment&gt;&gt;<wbr>associationOrUndeclaredAt: uses bindings inst.var.<br></div><div>How can it be so different, the selector does not speak, does it?<br><br></div><div>OK, there is a flag: #review in one of them, but that does not make code clearer, it&#39;s just a smell of over-complexity or ill-naming.<br></div><br>Whatever the reason (self explaining code?) Colin does not comment class/methods, that&#39;s a fact.<br>Chris made the effort of commenting Environment but then came this declarations/bindings split, and the comment did
 rapidly rot.<br>We have here an un-healthy statu quo crying for change.<br><br></div>So if we want to at least comment the class with the meaning/role/responsibility of inst vars, here is my understanding:<br><br>environment bind: #Foo to: 0. just add to the declarations.<br>(You see how names are not obvious: bind does not bind the new binding to bindings).<br><br>If the 
Environment importSelf, then the ClassBinding/Global also goes to 
bindings... (thru an observer pattern and the magic of naming policies)<br><br></div><div>The bindings is what is used by the compiler, so what if an 
environment does not importSelf? It means that the variable it declares 
are not bound, so it is not reachable (kind of invisible class/Global).<br><br></div><div>IOW, the bindings will contain all the imports, including self-imports.<br></div><div>importSelf is generally what we want to do, unless weird cases of powerless environment for obfuscation or trustless sandboxing reason.<br></div><div><br></div><div>Now, associationAt: does not speak for itself. It&#39;s too hard to decide if we&#39;re speaking of own declarations or bindings... Analyzing the usage is difficult. bindingAt: would be less ambiguous, so IMO we cannot fix without semantic shift.<br><br></div><div><div>The semantic will be carried by the senders (the Tools), and the tools by usage we want to make of Environment. So we first have to define that: what feature do we want to support? With which tool? That probably require yet another thread...<br></div></div></div>