this post was submitted on 07 Sep 2022
56 points (93.8% liked)

Programmer Humor

32070 readers
673 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Ephera@lemmy.ml 5 points 2 years ago (5 children)

...but why? This looks like it would never be expected behavior. Like a bug in the implementation, which can simply be fixed.

[–] Ephera@lemmy.ml 15 points 2 years ago (4 children)
[–] enebe@lemmy.ml 4 points 2 years ago (1 children)

Sweet Flying Spaghetti Monster, that's horrible. I'm guessing the reason is to keep the truth value equivalent when casting to boolean, but there has to be a more elegant way....

[–] Ephera@lemmy.ml 3 points 2 years ago

Might be, but this is also a decent explanation: https://lemmy.ml/post/464637/comment/272066

load more comments (2 replies)
load more comments (2 replies)