Click here to Skip to main content
15,888,454 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
jmaida29-Feb-24 12:06
jmaida29-Feb-24 12:06 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
jschell29-Feb-24 12:42
jschell29-Feb-24 12:42 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
jmaida29-Feb-24 14:35
jmaida29-Feb-24 14:35 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
jschell1-Mar-24 11:51
jschell1-Mar-24 11:51 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
jmaida1-Mar-24 15:04
jmaida1-Mar-24 15:04 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Jon McKee29-Feb-24 12:09
professionalJon McKee29-Feb-24 12:09 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Ravi Bhavnani29-Feb-24 11:51
professionalRavi Bhavnani29-Feb-24 11:51 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
David On Life1-Mar-24 10:05
David On Life1-Mar-24 10:05 
Good point. So, you're saying that if list.All(>0) then we should be able to assume that list.Any(>0) is also true? Makes sense.

However, it also makes sense that if list.All(>0) then list.Any(<=0) should be false, which it is, and we should be able to expect that if not list.Any(<=0) then list.All(>0) would be true, which it is (but wouldn't be if we changed it to work in your example).

The problem is that either way, when working with null sets, we end up with some relationship which isn't fully transitive.

For example, in SQL x = null and x <> null are both false (regardless of whether x is null or not, the only way to test for null is explicitly: x is null or x is not null ).
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
HobbyProggy29-Feb-24 20:13
professionalHobbyProggy29-Feb-24 20:13 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Martijn Smitshoek29-Feb-24 22:23
Martijn Smitshoek29-Feb-24 22:23 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
haughtonomous1-Mar-24 1:21
haughtonomous1-Mar-24 1:21 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Peter Moore - Chicago1-Mar-24 3:00
Peter Moore - Chicago1-Mar-24 3:00 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
lmoelleb1-Mar-24 2:17
lmoelleb1-Mar-24 2:17 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Peter Moore - Chicago1-Mar-24 4:01
Peter Moore - Chicago1-Mar-24 4:01 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
MSBassSinger1-Mar-24 3:58
professionalMSBassSinger1-Mar-24 3:58 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
R.Kramer1-Mar-24 4:07
R.Kramer1-Mar-24 4:07 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Peter Moore - Chicago1-Mar-24 5:50
Peter Moore - Chicago1-Mar-24 5:50 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Member 101590881-Mar-24 6:17
Member 101590881-Mar-24 6:17 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
ShawnVN1-Mar-24 8:11
ShawnVN1-Mar-24 8:11 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
jschell1-Mar-24 12:15
jschell1-Mar-24 12:15 
AnswerRe: .NET's Sometimes Nonsensical Logic Pin
Plamen Dragiyski2-Mar-24 10:38
professionalPlamen Dragiyski2-Mar-24 10:38 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
Harald M.3-Mar-24 23:49
Harald M.3-Mar-24 23:49 
GeneralRe: .NET's Sometimes Nonsensical Logic Pin
carloscs5-Mar-24 7:55
carloscs5-Mar-24 7:55 
JokeFor those celebrating their 21st birthday today... Pin
Daniel Pfeffer29-Feb-24 2:19
professionalDaniel Pfeffer29-Feb-24 2:19 
GeneralRe: For those celebrating their 21st birthday today... Pin
Richard Andrew x6429-Feb-24 2:56
professionalRichard Andrew x6429-Feb-24 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.