Kotlin 1.4 will optimize `trimMargin`, `trimIndent...
# language-proposals
b
Kotlin 1.4 will optimize
trimMargin
,
trimIndent
at compile time, see https://youtrack.jetbrains.com/issue/KT-17755 I thought this would also allow for const strings using that. I’m guessing this will be the next step.
j
That optimization shipped in 1.3.40
b
I know. I meant that allowing
trimMargin
in const expressions will be a likely next step since 1.4 shipped with optimizing it to constant strings at compile time.
j
Maybe. The issue to really follow is https://youtrack.jetbrains.com/issue/KT-14652 which brings this as a general feature that doesn't need special-cased.
👍 2