Open lziq opened 2 years ago
For anyone who wants this, as a workaround for now, you can create your own extension function like this:
fun IonElement.isNotNull(): Boolean = !isNull()
Did you just want this defined in the interface? I would do something like
public val isNotNull: Boolean
I'm a rookie < 1 year at my job just looking to contribute to some open source projects for some more experience. The pace of dev is slow where I work and I want to build my skills faster. Just rying to help. Thanks
Hi, thanks for your interest!
Did you just want this defined in the interface?
Something that is unstated but implied is that classes which implement IonElement
would also need an implementation of isNotNull
. (Otherwise the library won't compile.)
We would like for this change to be backwards compatible, so the implementation should be a default implementation in IonElement
since consumers of the library can create their own implementations of IonElement
.
Feel free to follow up with any more questions you may have—I'm more than happy to help.
Thanks for getting back to me. I'm going to dig into this to see if I can understand it some more.
For
IonElement
interface, currently we haveisNull
method to check if the value is null. Can we also add the methodisNotNull
to provide better ergonomics for users to write code?