Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@radekkozak
Copy link
Contributor

I propose simple change that i think would be beneficial from the perspective of java consumers, namely annotating component1() function with kotlin's @JvmSynthetic

As a consequence method will become invisible from Java. Long story short i think it's rather unneccesary to pollute java with a method that quite frankly doesn't say anything for them as the concept of kotlin's destructuring is simply not there. For getting actual values there is toNullable already so i don't see a point

Right now it looks like this:

koptional-in-java

Refine library's interop by hiding destructuring operator
from Java consumers
@artem-zinnatullin artem-zinnatullin self-assigned this Jul 31, 2018
@artem-zinnatullin
Copy link
Contributor

This looks reasonable, but I need to do couple tests and read the spec carefully

@artem-zinnatullin
Copy link
Contributor

cc @ming13 @dmitry-novikov @nostra13

@radekkozak
Copy link
Contributor Author

Great. And the missing doc in kotlin's platform annotations - i noticed that this morning as well - so thanks for filling it in already

Copy link
Member

@arturdryomov arturdryomov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be a pretty good thing, thanks!

@artem-zinnatullin artem-zinnatullin merged commit a8c7191 into gojuno:master Jul 31, 2018
@radekkozak radekkozak deleted the hide-destructuring-in-java branch July 31, 2018 18:40
@artem-zinnatullin
Copy link
Contributor

v1.6.0 was just released with this change https://github.com/gojuno/koptional/releases/tag/v1.6.0

Thanks for your contribution @radekkozak!

@radekkozak
Copy link
Contributor Author

You got it ! And likewise thanks for the lib - like the minimalistic approach to things

Best from Poland for the crew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants