[Ironruby-core] Code Review: ScopeCleanup5

Tomas Matousek Tomas.Matousek at microsoft.com
Wed Jul 22 17:38:54 EDT 2009


Sure, I'll re-add obsolete methods SetName, TryGetMember and ContainsName. There are no equivalents for *Lookup* members since these use Python specific scope chains.

Tomas

-----Original Message-----
From: Dino Viehland
Sent: Wednesday, July 22, 2009 1:52 PM
To: Tomas Matousek; IronRuby External Code Reviewers; Rowan Code Reviewers; Bill Chiles
Cc: ironruby-core at rubyforge.org
Subject: RE: Code Review: ScopeCleanup5

Given that it'll be pretty easy to do this I would suggest keeping around the old APIs on Scope and mark them as Obsolete to make the move for external users a little easier.

Otherwise it looks great!

> -----Original Message-----
> From: Tomas Matousek
> Sent: Wednesday, July 22, 2009 1:32 PM
> To: IronRuby External Code Reviewers; Rowan Code Reviewers; Bill
> Chiles
> Cc: ironruby-core at rubyforge.org
> Subject: Code Review: ScopeCleanup5
>
>   tfpt review "/shelveset:ScopeCleanup5;REDMOND\tomat"
>
> The long term goal is to allow Scopes to be backed by arbitrary
> objects and implement GetVariable/SetVariable/... via dynamic
> GetMember/SetMember/... actions. This will also allow languages to cache
> lookups to the scopes.
>
> The first step is to move Python specific stuff off the Scope and
> LanguageContext.
>
> Breaking changes in Hosting API:
> -     ScriptScope.GetVariable throws MissingMemberException if a
> variable is not found in the scope instead of a language specific
> exception (like Python's UnboundNameException).
> -     ScriptScope.GetVariable doesn't return variables that are not
> contained in the scope itself. Previously it returned e.g. Python
> built-ins (like "dir") if the scope was associated with Python.
> -     ScriptScope.RemoveVariable doesn't throw an exception if the
> member is not present. It returns false.
>
> Tomas


More information about the Ironruby-core mailing list