-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a static factory method to create the stub #163
Comments
What would this really buy us, though? Using the constructor is more conventional for Kotlin, and we can't add the static method to the same place that Java's would be, so having a "static" (companion?) factory doesn't seem to actually provide much benefit. |
@lowasser It just makes it easier for people already familiar with grpc-java by following the same convention. The Java constructors are, in fact, |
There is a difference in what is idiomatic in Kotlin versus Java, and idiomatic Kotlin tends more towards the use of constructors. In any event, I don't think we want to provide two ways of doing the same thing at this point. |
Just to be clear, I wasn't suggesting having two ways, but making the constructor |
The usual way to create a client stub in Java is using one of the static factory methods named
new*Stub
. Consider adding such a method for consistency instead of invoking the constructor directly.The text was updated successfully, but these errors were encountered: