[e-lang] Prettiness of Java statics classes: dropping the "make"
Kevin Reid
kpreid at mac.com
Sun May 11 08:07:27 CDT 2008
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?
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list