Answers for "kotlin dsl"

0

kotlin dsl

Kotlin DSL lets you define a specific "language" using an extension 
function under the hood. Useful for Builders, UI Layouts, and other
situations that have a standard structure.

fun doSomething(config: DoSomethingConfig.() -> Unit) {
	...
}

doSomething {
	configVar1 = ...
    configVar2 = ...
    if(condition) configVar3 = ...
}
Posted by: Guest on July-27-2021

Browse Popular Code Answers by Language