[squeak-dev] Re: Environment's #classNamed:

Frank Shearar frank.shearar at gmail.com
Sun Dec 22 19:09:58 UTC 2013


On 22 December 2013 18:16, Chris Muller <asqueaker at gmail.com> wrote:
> Yes, I had already gone back and read that several days ago when I
> made the decision to finally get into Environments.  That thread is a
> gem for getting started understanding Environments.
>
> Colin, Environments is exactly how I think the namespace problem
> should be solved -- I see it as dynamic renames during loading time
> (vs. a grand global namespace like Java).  Kudos for bringing this to
> life.
>
> What still remains a mystery (for me) is why we need this extra
> complication -- e.g., why can't I simply _import_ from other
> Environments.  Instead, I can only import from other Environments what
> I've declared as their _exports_.
>
> This does not seem to be in the spirit of Smalltalk -- having to
> "declare" the class-API's before I can use them.  I have to keep these
> two things "in-sync" with each other:  An Environments exports with
> the other environments imports.
>
> It reminds me somewhat of static-typing in that it's simply a "chore"
> I have to do for the satisfaction of the computer but no real benefit
> (that I can identify) for the developer...

This is way off topic for the thread. You need to try out Haskell or
OCaml, because it sounds like you've not used a language with a decent
static type system. A static type system provides you with axioms,
letting you prove certain properties of your system. Or: programming
in the type system is proof writing. Static typing is an
extraordinarily powerful tool. C++ and Java's type systems are a joke,
so if that's all you've used, I can understand why you might not see
much benefit to a static type system.

frank

> On Sat, Dec 21, 2013 at 6:53 PM, Colin Putney <colin at wiresong.com> wrote:
>>
>>
>>
>> On Fri, Dec 20, 2013 at 3:04 PM, Chris Muller <asqueaker at gmail.com> wrote:
>>
>>>
>>> And, also, let me pose an additional question:  Why do we need
>>> 'exports' at all?  The use-case we're solving is name-disambiguation,
>>> period.  Exports seems to be about making certain classes
>>> "unimportable", e.g., "private".
>>>
>>> Why are exports needed at all?
>>
>>
>> Name disambiguation is *one* of the use cases. Private classes is another
>> one. I'd really like to be able to set up an Xtreams environment properly.
>> See the discussion on Xtreams here:
>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-June/164605.html
>>
>>
>>
>


More information about the Squeak-dev mailing list