Re: [Jruby-devel] include_class

2006-05-22 Thread Charles O Nutter
Tom clued me in that I was one who originally opposed 'import', and reading back over my reasons I think perhaps they're still valid:- Our import would behave differently than Java's, so it seems better to use include_package and include_class to differentiate them - 'import' could easily conflict

Re: [Jruby-devel] include_class

2006-05-11 Thread David Corbin
On Wednesday 10 May 2006 08:26 pm, Charles O Nutter wrote: > - In most cases, there will be a local filesystem involved 1) I have definate plans to try an applet 2) classes in jar files are not in the local filesystem. > - We only look in one classloader even now, which should delegate to > classl

Re: [Jruby-devel] include_class

2006-05-10 Thread Charles O Nutter
- In most cases, there will be a local filesystem involved - We only look in one classloader even now, which should delegate to classloaders higher in the hierarchy anyway. Plus, we only need names of classes. - We can fall back on the "slow" way if anything fails. On 5/10/06, David Corbin <[EMAI

Re: [Jruby-devel] include_class

2006-05-10 Thread David Corbin
That example looks very flawed to me. It's assuming there's local file system involved in holding the classes. Not only that, but you can have classes in one package available from multiple different class loaders On Wednesday 10 May 2006 06:47 pm, Charles O Nutter wrote: > As an aside, here'

Re: [Jruby-devel] include_class

2006-05-10 Thread Charles O Nutter
As an aside, here's an interesting code snippit for loading all classes in a given package. Basically, you just ask the classloader for a resource for the package, and then iterate over contents. Might be a good way to make import "foo.*" work as expected. http://www.jonpeck.com/forum/viewtopic.p

Re: [Jruby-devel] include_class

2006-05-10 Thread Charles O Nutter
I wouldn't mind an alias, and we could probably jury-rig import "foo.*" to work at least as poorly as the old method of including a package. - Charlie On 5/10/06, David Corbin <[EMAIL PROTECTED]> wrote: On Wednesday 10 May 2006 07:14 am, David Corbin wrote: > On Wednesday 10 May 2006 02:38 am,

Re: [Jruby-devel] include_class

2006-05-10 Thread David Corbin
On Wednesday 10 May 2006 07:14 am, David Corbin wrote: > On Wednesday 10 May 2006 02:38 am, Charles O Nutter wrote: > > Can anyone remember why we decided to use include_class instead of > > import? It suddenly occurred to me today that import is both shorter > > and more precise, since we're reall

Re: [Jruby-devel] include_class

2006-05-10 Thread David Corbin
On Wednesday 10 May 2006 02:38 am, Charles O Nutter wrote: > Can anyone remember why we decided to use include_class instead of > import? It suddenly occurred to me today that import is both shorter > and more precise, since we're really importing a Java class into the > current namespace. I suspe