user
07/05/2016, 1:19 PMIf there is a logical grouping of entities in your code, why deprive those who work with your code from access to that grouping, and present it only in the documentation?They wouldn't be deprived of it, if the methods are grouped inside the same file, or appear sequentially in the code separated by some form of heading comment (e.g.,
// ----- My Section ------
).
I don't see how, with IntelliJ's import management features, requiring extra imports is a problem at all. You don't need to write them, and you don't need to see them.There is a cognitive dissonance here with the fact that everything in the standard library is imported by default (unlike in Java). ------------------------- For an example of why this would be beneficial, consider https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/. I don't consider the laundry list of methods at the bottom to be especially user friendly. It would pay to split it a few sections: one for accessing elements of the list, one for filtering or taking subsets of the list, one for conversions, one for sorting, ...