Re: Prettiness of Java statics classes: dropping the "make"
David-Sarah Hopwood <david.hopwood-mRVxzIiVagSlV3Ge8JjJtnfLna9zW77MtUK59QYPAWc@public.gmane.org>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
Kevin Reid wrote: > Java libraries often have classes which are used solely for their > static fields and methods, not instantiated. > > However, the current E notation for using one is rather bad: > > ? def m := <import:java.lang.makeStrictMath> > # value: <makeStrictMath> > > in that it has a "make" which makes no sense. > > As these are basically classes being used as singleton objects, I > propose that there be a safej option which makes these classes' > import fqns more fitting: > > ? def m := <import:java.lang.strictMath> > # value: <strictMath> > > ? <import:java.lang.makeStrictMath> > # value: <strictMath> > > (Note that the import fqn is not "java.lang.StrictMath", as that > should be a guard.) > > What do you think of this idea? What happens if the class begins with a lowercase letter? -- David-Sarah Hopwood