Add classes that were introduced to java.lang in Java 7/8 into DEFAULT_IMPORTS
Now that Clojure 1.10 alpha-6 dropped support for Java <=7, it seems reasonable to add the classes that were newly introduced to the java.lang package in Java <=8, into Clojure's DEFAULT_IMPORTS.
Here is the list of those classes I'm aware of:
Introduced in Java 7:
Introduced in Java 8:
Prescreened by: Alex Miller
Several nested classes in java.lang are also not yet auto-imported. Some of them are though:
The missing imports are the following:
Perhaps it would be good to add those here as well. At least I was surprised not being able to use bare Character$UnicodeBlock.
Added the patch, just in case
I think we should uphold what has been true and stated in the past - stuff in java.lang is auto-imported. I do not think autoimporting 6 classes will affect startup time.
Besides AutoCloseable, the rest of those classes are rarely used. I'd rather import them explicitly over polluting the ns imports tbh. (Interfaces annotated with FunctionalInterface, an annotation type, are common; using it explicitly isn't)
There is a minor startup time cost to additional classloading, for classes not already loaded by the java.base module. I've experimented with dropping a bunch of rarely used default imports (a breaking change, no doubt).