[e-lang] Prettiness of Java statics classes: dropping the "make"
David-Sarah Hopwood
david.hopwood at industrial-designers.co.uk
Sun May 11 08:14:32 CDT 2008
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
More information about the e-lang
mailing list