hey everyone. is there a best practices for the fo...
# getting-started
o
hey everyone. is there a best practices for the following cases:
Copy code
abstract class DownstreamServiceRequest {
    abstract val authorization: String

}
---
class GrpcDownstreamServiceRequest(
    override val authorization: String,
    val methodDescriptor: MethodDescriptor<Message, Message>,
) : DownstreamServiceRequest() {
...
}
vs
Copy code
abstract class DownstreamServiceRequest(
    val authorization: String
) {
...
}
---
class GrpcDownstreamServiceRequest(
    authorization: String,
    override val queryInputs: Map<String, Any>,
) : DownstreamServiceRequest(authorization) {
}
g
There is no Kotlin specific convention for this, I would argue that it really depends on usage of authorization inside of DownstreamServiceRequest But personnally I would prefer second one, it's way more explicit and gives more control for DownstreamServiceRequest