this post was submitted on 07 Sep 2023
29 points (69.9% liked)
Programmer Humor
32571 readers
447 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can go one step further and use the Bang-Bang operator:
!!m
To be read as "Bang! Bang! You're a boolean now!"
I might be in the minority but I prefer to do it like this:
Boolean(m)
.It's the same thing but less cool. On the flip side it's easier to read when you have a line full of operators.
Yep, that's a much better way! It's like the "goes down to" operator - a neat trick you should never use :)
while (i --> 0) { ... }