The JB team, and especially Andrei have always wanted strong use cases as a requirement for even considering the feature.
I’m not sure I’m seeing a strong case here. It looks like a fun thing to have, but I suspect implementing this would have many drawbacks:
- Tools: I’m not sure IntelliJ is equiped for that. Furthermore, when you’d use a new type, where would the corresponding import go ?
- I feel it’s counter-intuitive to have, for example, a Date object in two classes of the same file that are not the same type (one would be java.util.Date, and the other java.sql.Date). Reading this would not be pleasant.
- Even if Kotlin allows multiple classes per file, a file is still a “logical unit of compilation”. If you have so different imports per classes, maybe they should not be on the same file?