poohbar
07/27/2021, 12:05 AMephemient
07/27/2021, 12:56 AMephemient
07/27/2021, 12:58 AMephemient
07/27/2021, 12:59 AMAlexey Belkov [JB]
07/27/2021, 9:59 AMCasey Brooks
07/27/2021, 3:31 PMpoohbar
07/28/2021, 4:37 PMephemient
07/28/2021, 8:00 PMpoohbar
07/29/2021, 2:52 PMpoohbar
07/29/2021, 2:53 PMCasey Brooks
07/29/2021, 3:22 PMPlease buy:
- eggs
* milk
1. bread
You’d do
Please buy:
- eggs
- milk
- bread
A bulleted list very clearly is not grammatically correct, and yet it still makes sense. For Kotlin, it’s about turning the inline “sentence” of parameters into a “bulleted list” of parameters. Just like it makes more sense to break parameters down by putting the first one on the next line, it also makes more sense to include a trailing comma in a multi-line list to keep all “bullets” looking the same
// bad
doAThingWithManyParameters("one",
"two",
"three")
// even worse
doAThingWithManyParameters("one",
"two",
"three"
)
// better
doAThingWithManyParameters(
"one",
"two",
"three"
)
// best
doAThingWithManyParameters(
"one",
"two",
"three",
)
Casey Brooks
07/29/2021, 3:25 PM