Which programming language is this?
@MainActor
func loadProfile() async throws -> (User, [Post]) {
async let user = api.fetchUser()
async let posts = api.fetchPosts()
return try await (user, posts)
}
Answer: Swift
The
Play Programming Languages ▸
@MainActor attribute, async let bindings, the -> (User, [Post]) tuple return and try await are Swift, not Kotlin.