Feature request: aliasing classes at import
Ben Evans
benjamin.john.evans at gmail.com
Thu Jul 14 23:17:31 PDT 2011
On Fri, Jul 15, 2011 at 1:52 AM, Kelly O'Hair <kelly.ohair at oracle.com>wrote:
>
> Kind of looks like C macros:
>
> #define UDate java.util.Date
> #define SDate java.sql.Date
>
> Oh, that would be bad right? Did someone say Java shall not have macros?
> ;^)
>
Well, in this case, I think the OP's intention was that these import aliases
would be scoped to a single file, rather than global textual replacement.
I think that it would be fine if all it does is provide an alternative,
non-clashing short name for a class.
This is very similar to a feature of Scala's import statement, by the way.
Joe: What's the process for Java 8 Coin changes? Are we at a stage where you
want actual proposals and strawman prototypes yet (assuming you're going to
be carrying on the work you did for 7 in the JDK8 project)?
Thanks,
Ben
More information about the jdk8-dev
mailing list