Replies: 2 comments 27 replies
-
IIRC much of |
Beta Was this translation helpful? Give feedback.
15 replies
-
Not only is it difficult, it's outright impossible. This API has shipped. It has had this behavior for 15+ years. There are millions to billions of LOC that depend on it behaving this way. It absolutely cannot change. |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Consider the following code:
The
cocFile
variable is treated as not null, which introduces the possibility of bugs, becauseFirstOrDefault
(and its async counterpart) can return null. Is it because those methods aren't decorated with attributes?The other option is to make 2 versions of these methods, one where T is class and one where T is struct, then return type can be
T?
, which means 2 different things (attribute-decorated reference T and Nullable, respectively). This is a non-starter forEnumerable
andQueryable
classes for obvious reasons (or is it??)Beta Was this translation helpful? Give feedback.
All reactions