Is there a recommended convention on defining/passing the very ubiquitous modifier arguments? E.g.
1. Always define the modifier first or last?
2. Always pass the modifier argument first or last?
3. Do it wherever you want, just always use modifier =, so it's clear?
4. Something else?
I can’t speak to order but what I’ve been doing more consistently in general is always typing out parameter names to make it clear and not rely on editor inlay hints
s
svenjacobs
12/31/2022, 12:06 PM
According to the Compose ktlint rules for example,
Modifier
should be the first parameter of parameters with default values, after the last parameter without a default value. So for example: