this post was submitted on 21 Mar 2025
665 points (99.4% liked)

Programmer Humor

21872 readers
313 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
[โ€“] fushuan@lemm.ee 2 points 4 days ago (1 children)

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

[โ€“] jjjalljs@ttrpg.network 2 points 4 days 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