Skip to content

Reconsider lambda single-lining for Jetpack Compose #547

@ursusursus

Description

@ursusursus

I know this is going to be controversial & I'm a fan of single config, but in 2025 UI's are made with Kotlin as well (Jetpack Compose), and trailing lambda is very common,

however in UIs nesting means..nesting. It has a semantic meaning (parent-child relationship). It's not just a stylistic choice.

App { SelectableCard { Button { Text("") }}}

Is obviously not conveying that & makes it harder to reason about, versus

App { 
    SelectableCard { 
        Button { 
            Text("")
        } 
    } 
}

which is natural way of reasoning about UIs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions