[squeak-dev] Environment declarations vs bindings

Gary Mary anonymous4.anonymous2 at gmail.com
Wed Sep 28 21:03:38 UTC 2016


Protecting the environment is very important. It is made up of the very air
we breathe, as well as the things which we eat. I would love to answer some
of your questions about bothersome details, so ping. For starters, the
implementation of the environment in our lives couldn't be more obvious.
Like, you literally walk outside and it's like trees and water and ducks
and the Taco Bell down the street and it's like: "Woah dude. I'm alive."
It's the same thing for us every day. I don't know how it could be less
different, and I don't believe in natural selection, it speaks for itself,
and it's pretty wild.

On another note, I read a book the other day while I was in school. It was
called: "Sus." It went: "Sus." I felt pretty inspired so I went home from
school and wrote a story called: "Sus." It went:

"Sussowssaucesoossiissooososousususoes...s..."

I sent it into the paper, still havent heard anything from the editor but
I'll let you know how it goes. Nice hearing from you Nicolas!

Sincerely

Gary Mary

On Wed, Sep 28, 2016 at 5:59 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

> 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.
>
> Implementation of Environment is sometimes not obvious:
> - Environment>>associationAt: uses declarations inst.var..
> - Environment>>associationOrUndeclaredAt: uses bindings inst.var.
> How can it be so different, the selector does not speak, does it?
>
> OK, there is a flag: #review in one of them, but that does not make code
> clearer, it's just a smell of over-complexity or ill-naming.
>
> Whatever the reason (self explaining code?) Colin does not comment
> class/methods, that's a fact.
> Chris made the effort of commenting Environment but then came this
> declarations/bindings split, and the comment did rapidly rot.
> We have here an un-healthy statu quo crying for change.
>
> So if we want to at least comment the class with the
> meaning/role/responsibility of inst vars, here is my understanding:
>
> environment bind: #Foo to: 0. just add to the declarations.
> (You see how names are not obvious: bind does not bind the new binding to
> bindings).
>
> If the Environment importSelf, then the ClassBinding/Global also goes to
> bindings... (thru an observer pattern and the magic of naming policies)
>
> 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).
>
> IOW, the bindings will contain all the imports, including self-imports.
> importSelf is generally what we want to do, unless weird cases of
> powerless environment for obfuscation or trustless sandboxing reason.
>
> Now, associationAt: does not speak for itself. It's too hard to decide if
> we'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.
>
> 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...
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160928/b1943319/attachment.htm


More information about the Squeak-dev mailing list