I check source code find some method will return null like find_one, but other(delete_one) will not return null. This is inconsistent.For methods return a result_type like insert delete, there is no need wrap the result_type by optional, because the result_type already can take the semantic of "no value", warp it by a optional means want to express "no value of no value", that is meaningless.
This design confuse me (so I ask this question), in fact only methods which return an "concrete type"(like find) needs wrap by optional to represent "no value"
在 2016年4月7日星期四 UTC+8下午6:41:34,li ning写道:
The insert, delete return an optional, but doc has not talk about in what situation the return value is null. I mean
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/f01fe764-b046-4925-bd17-5fbba9005065%40googlegroups.com.