this post was submitted on 21 Mar 2025
677 points (100.0% liked)

Programmer Humor

22085 readers
817 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

Original post: hachyderm.io (Mastodon)

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 1 week ago (1 children)

Fyi, using a condition to assign a boolean is equivalent to assigning the condition itself. No need for the IF.

[โ€“] [email protected] 3 points 1 week ago

true, though sometimes i find the more verbose style easier to read, and more maintainable (eg: you want to do something else in the block, you can just add a line instead of changing your ternary / etc). Small things