Frank Wierzbicki wrote:
> That would be just about perfect (caveats are fine and expected), and
> it would not take very much bending at all to get the packagecache
> mechanism to provide a similar API for the cases that it covers (so
> that older JDKs could use something like this).

Yeah, reading John's response made me think "hey, that's essentially 
what packagecache gives us, in another form". Walking resources and 
having access to the same smarts about what's a class and what isn't 
would get us most of the way, I think.

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).

- Charlie

--~--~---------~--~----~------------~-------~--~----~
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