What do you guys think about long functions with e...
# codingconventions
j
What do you guys think about long functions with expression bodies? Like this:
Copy code
fun createList(source: Source) = mutableListOf<Item>().also {
   // Code that accesses source, adds item to list, etc
   // On the long-ish side
}
đźš« 5
e
m
As long as the body logic is factored out to private methods or collaborator objects, and doesn’t cover more than one responsibility I think it’s ok.