Hello, do you plan to reduce number of exclamation marks from two to one somewhere in future? results!.size looks better than results!!.size
Irrespective of the merits of one versus two ! symbols, that ship has sailed over a year ago (with the release of 1.0). I agree that results!.size looks better, and that is precisely the reason why results!!.size is better. The use of !! is ugly code, so it should look ugly.
yes, i doubt there is no way to implement results!.size along with results!!.size
I use checkNotNull or requireNotNull
instead of !! ?
Yes, I prefer IllegalStateException and IllegalArgumentException to NullPointerException.
Obviously I try to avoid each unuseful check.
Otherwise we should require to write result!write
No, we have no such plans. It's very intentional that !! looks the way it does.
Correct me if I'm wrong, but I believe they went the double route because it's something you should only do if you're 100% sure of it. It's also easier to debug if you have two instead of one.