On Thu, Oct 16, 2008 at 10:54 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Thursday 16 October 2008 07:22, Jim Menard wrote: >> On Thu, Oct 16, 2008 at 9:59 AM, Rich Hickey <[EMAIL PROTECTED]> > wrote: >> > Clojure doesn't support classes not in packages. >> >> Why not? Please don't take this question as a criticism. I'd really >> like to know the reasoning. Was the choice technical or >> philosophical? > > You can't do it in Java either. Any Java class that is not in the > default package cannot access any class that is in the default package. > The default package is an isolated world unto itself.
You can't write code to reference Foo in the default package from com.mypackage.Bar, but you *can* use Class.forName("Foo") to get the Foo class and to create an instance of Foo. > As strictly a personal opinion, the so-called "default" package (more > accurately referred to as the anonymous package) was a bad idea from > the start. As my friend points out, it *is* good for teaching and simple one-offs. Otherwise, I tend to agree. Jim -- Jim Menard, [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.io.com/~jimm/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---