Use objects for namespaces
hrules6872 opened this issue · comments
Héctor de Isidro commented
This took me more than a while to reconcile with myself on, because when I see a bunch of top-level functions like this the first thing I think is that we're going to end up polluting our class-space very quickly.
Are there opinions on utilizing some kind of namespacing here?
object Spacers {
@Composable
fun XLarge(modifier: Modifier = Modifier) {} // ...
}
// Usage
Spacers.XLarge()
This has the upside of making it easier to find things. If I want a specific spacer I can do Spacers.
and get a nice list.
I can be convinced either way, just a random musing.
Originally posted by @exallium in #66 (comment)