-
Notifications
You must be signed in to change notification settings - Fork 44
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
naming: delete vs release #707
Comments
Not to discourage you https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/ 😅 |
I agree that |
What's the status of this? One issue I see is |
Same can be said about |
We have
delete
,deleteIn
and in dart-archive/jnigen#130deleteOriginal
."delete" refers to deleting the handle that holds on to the Java object (
DeleteGlobalRef
).However, the method is on an object representing a Java object. And we're not actually deleting any Java objects. Instead, we're letting go of the Java object.
Someone using our API does not know about handles, they just know that we are "referring" to a Java object (
JReference
).So, we should consider renaming "delete" to something that signals we're no longer holding on, no longer referring to the Java object. For example "release". You release the object, the opposite of holding on. (Or maybe the opposite of holding on would be "let go" but that is two words.) Or another option is we "forget" about the Java object, but that seems like we're in control of what we're doing. So, "release"?
Some prior discussion: #766
@mahesh-hegde I want to move more and more away from the JNI implementation details. 🙃
@HosseinYousefi what are your thoughts about this?
The text was updated successfully, but these errors were encountered: