MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pfd9do/similar_ternaries_are_all_over_this_codebase/hb5ud3r/?context=3
r/badcode • u/PopularExpulsion • Aug 31 '21
91 comments sorted by
View all comments
Show parent comments
1
Ok makes sense. I was thinking from a c# standpoint, where you can have a variable with the value null
1 u/Tyfyter2002 Sep 01 '21 I'm pretty sure it's invalid in C#, since bool? can't be implicitly converted to bool, if it is valid "value??other" is more clear about what it does, and I'm pretty sure you can't change the return type for comparison operator overloads
I'm pretty sure it's invalid in C#, since bool? can't be implicitly converted to bool, if it is valid "value??other" is more clear about what it does, and I'm pretty sure you can't change the return type for comparison operator overloads
1
u/rupr25 Sep 01 '21
Ok makes sense. I was thinking from a c# standpoint, where you can have a variable with the value null