I saw a kotest presentation today. The small thing...
# kotest
e
I saw a kotest presentation today. The small thingy that looks like could be improvement to use function factory instead of constructor for Spec that would allow making code like
Spec({..
to
Spec {
. Or it was proposed/discussed already? (I didn't find such in the GH issues).
e
I think the closest we could get would be something like
Copy code
class SomeSpec : Spec by stringSpec {

}
But I think it would require quite some changes
e
I was thinking about
Copy code
abstract class Spec(lamda: Extension.()->Unit) : ....
to
Copy code
class Spec(...

public fun Spec(lamda: Extension.()->Unit)) = Spec(lamda)
Ah, no
That will translate to something
fun SomeSpec = Spec {...
or
val MySpec = Spec {...
e
yeah 🙂
or to
object SomeSpec : Spec by Spec { }
but it requires us to change all specs to interfaces
e
That I can not translate if you are for or against it 🙂
e
I'm undecided 😁 just stating that it would probably be a big change
e
Thanks! Does kotest have something like KEEPs?
e
Nothing formal, but you could of course take inspiration from the KEEP format and raise an issue
e