【发布时间】:2018-03-30 20:18:57
【问题描述】:
在Kotlin DSL 示例中,他们使用plus 符号来实现原始内容插入:
html {
head {
title {+"XML encoding with Kotlin"}
}
// ...
}
是否可以在接收器中定义“无名”函数以便能够编写
html {
head {
title {"XML encoding with Kotlin"}
}
// ...
}
在未来的 Kotlin 版本中是否有这样做的计划?
在 Kotlin 之外的语言中是否有这样的东西?
【问题讨论】: