-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Duplicated(?) pseudo-constructor for Channels #118
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
Comments
The first pseudo-constructor was added for the purpose of ahead-of-time dead code elimination (if you are using only rendezvous channels in your code, it should be possible to statically provide this fact and remove all other implementations from your code). We're not there yet, but that is a tentative goal. Anyway, for 0.xxx release we are trying not to remove anything to keep binary compatibility for people who rely on We will review all the methods for 1.x release and remove all the deprecated method and all the overloads like this if we find them unnecessary. |
Thanks @elizarov! |
Adding/removing default parameters is non-binary compatible change in Kotlin. We might deprecate anything before 1.0 release of |
There are two pseudo-constructors for Channels:
The second constructor completely includes the first one if capacity is 0.
It's KDoc says:
So, my suggestion is to remove that first pseudo-constructor and add default parameter to the second like below. This won't affect existing API from user's perspective, and we'll get beautiful kotlinized factory method:
I can send a PR with this change.
The text was updated successfully, but these errors were encountered: