interface load {
fun load()
}
object gli :
load
gli.load()
k
karelpeeters
09/22/2017, 10:10 AM
And the implemetation would be in
interface load
? That's a really strange design ☺️
e
elect
09/22/2017, 10:12 AM
it's the current way I found to keep methods in separated files but available under the same
object
elect
09/22/2017, 10:12 AM
if you have a better idea, don't hesitate
k
karelpeeters
09/22/2017, 10:14 AM
One option is to make them package-level methods, you can split those over multiple files quite easily. I think the only other option is to make a base class for all of the properties and use extension functions to split the function over multiple files.
karelpeeters
09/22/2017, 10:15 AM
But it looks like you're making a god object, an object with hundreds of semi-related functions, that's often considered a code small.
e
elect
09/22/2017, 10:17 AM
I also took in consideration the package-level options, but it doesn't play so nice as kotlin with java