On Fri, Mar 20, 2009 at 10:16 PM, Charles Oliver Nutter
<[email protected]> wrote:
> For what it's worth, JRuby handles import pkg.* by adding a
> const_missing hook to that namespace that handles missing constants by
> trying to classload them, prepending the package name. So it's sort of a
> lazy way to add a package into the search sequence for a constant. We'd
> rather use something like packagecache, since adding hooks like
> const_missing is a little invasive (and there's always a possibility
> someone else has installed their own we would be interfering with).
That's interesting, I might want to take a look at JRuby's
const_missing hook at some point.  We allow users to turn the
packagecache mechanism off (there are lots of situations where it is
undesirable), but this causes code like

from java.nio import *

To work when it is on, but fail in an ugly way when off.  It would be
nice to have a backup plan.

-Frank

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to