<Compose Compiler 1.5.0 with Kotlin 1.9.0 support ...
# compose
e
f
Named arguments for
@Composable
lambda calls have been deprecated. This feature is relying on internal compiler APIs and will not be supported by K2.
WHAAAT? What does this mean exactly? Just that I can't do this?
Copy code
val comp = @Composable { a: String -> 
    ....
}
Or does that mean that I can't even do this?
Copy code
@Composable
fun MyComposable(body: @Composable (a: String) -> Unit) {}
I guess that is the same thing but I use that! 😞 That's normal Kotlin feature so this seems like a significant omission.
e
no, it means that if you have
Copy code
@Composable
fun MyComposable(body: @Composable (a: String) -> Unit)
you can no longer use
Copy code
body(a = "")
but must use the positional
Copy code
body("")
instead. which is normal Kotlin to begin with,
NAMED_ARGUMENTS_NOT_ALLOWED
on all non-composable lambdas
f
Ah, I see. That's not that bad and thanks for the clarification 😅 I was panicking a bit
e
Would be nice if that was supported in Kotlin 😁
and even though it would be nice in some use cases, I think it leads to some language design questions that would need to be answered, such as what should
Copy code
fun f(a: Int, b: Int)
fun g(b: Int, a: Int)
for (h in listOf(::f, ::g)) {
    h(1, 2)
    h(a = 1, b = 2)
do…
d
Please stop writing this kinda thing lol
My eyes are not happy.
😜
z
I found the content of this link is different when language is not English. When i set Chinese, can not find 1.5.0.
e
it's not just Chinese, all the translations are several months out of date
115 Views