The trailing closure is beautiful!

zoujiaqing zoujiaqing at gmail.com
Tue Dec 8 05:06:37 UTC 2020


On Monday, 7 December 2020 at 19:37:43 UTC, zoujiaqing wrote:
> In swift:
>
> ```
> import SwiftUI
>
> struct ContentView: View {
>     var body: some View {
>         Text("Hello World")
>     }
> }
> ```
>
>
> In kotlin:
>
> ```
> @Composable
> fun ArtistCard(artist: Artist) {
>     Row(verticalGravity = Alignment.CenterVertically) {
>         Image(...)
>         Column {
>             Text(artist.name)
>             Text(artist.lastSeenOnline)
>         }
>     }
> }
> ```

How is this implemented in D?


More information about the Digitalmars-d mailing list