Re: Spurious "make" in Java bindings, and safej extensions
Mark Miller <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, May 14, 2009 at 9:21 PM, Kevin Reid <[email protected]> wrote: > E-on-Java currently defines a Java class's (e.g. foo.Bar) statics > object to have the FQN foo.makeBar. However, in Java there are > occasionally classes which are made solely as repositories of static > members; putting "make" on the name of these classes, as well as > interfaces being imported for their static members, is silly. > > Examples: > > javax.swing.ScrollPaneConstants > org.erights.e.elib.Ref (as far as the E user is concerned) > java.lang.Math (and StrictMath) > java.util.Collections > > I propose that there should be an option in the safej file controlling > whether the class is available as foo.Bar, foo.bar, or foo.makeBar. I like that. > (Note that the code support for lookup of classes under multiple names > already exists as part of the transition from <import:foo.Bar> > (currently deprecated) to <import:foo.makeBar>; this would simply be a > condition to un-deprecate one of them.) Yes. > Two other related points: > > - Has <import:foo.Bar> returning a StaticMaker been deprecated long > enough that we can do the second stage of making <import:foo.Bar> > returning the type object? Yes, I think so. The old form causes a warning to be issues, and I've been fixing these as I see them. Might be good to do more static checking first though. > - How about adding an option to safej to specify the class's sugar > class, if any? Is speced in org/quasiliteral/schema/safej.schema. Never implemented. Would be good. -- Text by me above is hereby placed in the public domain Cheers, --MarkM