Hi,

2010/11/30 Jedediah Smith <redmine / ruby-lang.org>:
> There are many ways for refinements to leak out of the lexical scope that=
 uses them:

That is why I called it *pseudo*-lexical.

> 1. Inheritance (which is used in many APIs e.g. ActiveRecord::Base)

I guess this needs more discussion.
We may need something like `private using' which does not affect subclasses=
.

> 2. DSLs that use instance_eval
> 3. Re-opening a class

I guess they are more controllable than inheritance.  But they may
have other problems as pointed out by Charles.

> 4. When a class that uses refinements is itself refined (or does it not w=
ork that way?)

I guess it doesn't work that way because we have no local rebinding.

> Also, if "using" and "include" both operate on modules, the difference be=
tween them is going to be confusing, particularly for those unfamiliar with=
 the history of the language. It seems arbitrary to overload modules with a=
 use unrelated to their existing purpose. And having to group refinements i=
n modules seems overly complicated for many cases. I would like to be able =
to do something like this:

I don't think it's so confusing.  It complies with the Large Class Principl=
e.

--=20
Shugo Maeda