bert at freudenbergs.de
Thu Jul 5 20:27:10 UTC 2012
On 2012-07-05, at 19:15, Colin Putney wrote:
> On Thu, Jul 5, 2012 at 8:11 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>> Right. So what you're saying is that if you want proper modules, you
>> need VM support.
> Not necessarily. For the next experiment, I've been thinking about
> implementing selector spaces. Here's how it might work:
> • Each environment has its own Symbol table
> • The scanner delegates interning of symbols to the environment
> • When interning a symbol the environment searches its imports
> • If no imported environment has the symbol, it creates one in its own
> symbol table
> This would mean that an environment could add extension methods to
> classes in other environments, without colliding with other
> extensions. It would also make it possible to create "private
> overrides" where only code in that environment would use the override.
> It might be useful for sandboxing, but might not be sufficient.
Cool idea. Since the VM just cares about the identity of Symbols, we can have the same selector twice in one method dictionary. Each environment would send only the one from its own Symbol table.
> I want to stress, though, that this is *not* part of the current
> proposal—it's just some ruminating about what the next experiment
> might be, someday.
- Bert -
More information about the Squeak-dev