<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 30 September 2016 at 14:36, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt;&gt; I don&#39;t like the idea of CurrentEnvironment at all. IMO global state<br>
&gt;&gt; stinks.<br>
&gt;&gt; It would mean that a lotta behavior would change by simply switching one<br>
&gt;&gt; shared variable...<br>
&gt;&gt; I see it more like a not so clever workaround to make tools still work in<br>
&gt;&gt; presence of environments with minimal changes.<br>
&gt;<br>
&gt;<br>
&gt; Global state does indeed stink, which is why Environments is so nice,<br>
&gt; because &quot;global&quot; isn&#39;t global anymore.<br>
<br>
</span>This deserves some qualification.  Its true that writable globals<br>
stink, you never know what state its going to be in, and updating it<br>
introduces contention, etc.  However, Class names don&#39;t suddenly point<br>
to a different class object within the context of a running<br>
application, and no one ever replaces Smalltalk with a new instance.<br>
These globals are just &quot;there&quot; -- read-only bindings which don&#39;t<br>
suffer the stinky issues associated with writable globals.<br>
<br>
I&#39;m glad Nicolas started the other thread asking &quot;what&#39;s it for?&quot;  To<br>
me, that&#39;s the most important question -- is there something actually<br>
truly useful gained in exchange for complicating the language and<br>
tools?  Is it only about everyone being able to have elegant,<br>
prefix-less class names all loaded into one image?  Most of the<br>
use-cases mentioned in this and the other threads were just &quot;cool ways<br>
to handle a one-off problem.&quot;<br>
<br>
For the real world, we have been wanting smaller, more modular images.<br>
The conditions of having less code and responsibility in those smaller<br>
images bodes them less likely to benefit from Environments.  Multiple<br>
small images passing messages over the network lets those Smalltalk<br>
applications run on multiple processor cores, compared to one<br>
monolithic image with all the code loaded and disambiguated via a<br>
hierarchy of Environment imports/exports and running on just one<br>
process core.<br>
<br>
In 15 years, I think I&#39;ve had just one name collision between classes<br>
of different packages (neither of which used prefixes).  I think I<br>
simply renamed one of them.  Dynamic system.  With Environments, I<br>
would still have had to write some code to do various<br>
imports/exports/renames, etc.. and so it doesn&#39;t actually save me any<br>
development effort.  I guess it boils down to letting me keep pretty,<br>
but ambiguous, names in the code.  But, I actually prefer prefixes...<br>
<br>
Not trying to be a party pooper, but complexity is commonplace,<br>
simplicity is rare.  If we still have a simple system, we should value<br>
that aspect and try to keep it that way.  At least _optionally_...<br>
<br>
Best,<br>
  Chris<br></blockquote><div><br></div><div>Well, there&#39;s simple, and there&#39;s simplistic, and these are not the same thing. Environments abstracts, and makes uniform, the binding of names to variables (which includes classes and globals). Instead of the single, and therefore specialised, and therefore apt to make klunky, mapping of names to things, the implementing of Environments focuses attention on a often neglected part of programming.</div><div><br></div><div>But I&#39;ve had these discussions before, and I don&#39;t have the energy to pursue them, therefore I don&#39;t really have a voice in the matter.</div><div><br></div><div>I am, however, sick to death of things being invented in Smalltalk, only to die in its birthplace, while the rest of the world sees value, and wholeheartedly takes up the concept. I&#39;m not saying you&#39;re doing this now, Chris, but I have often, often heard people in the Squeak community say &quot;oh, it was Too Complicated, it Wasn&#39;t Simple, Not Worth It&quot; while Ruby, Perl, Clojure, Fortress, Scala all say &quot;yep, great idea, thanks!&quot;.</div><div><br></div><div>frank</div></div></div></div>