There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

AlmightySnoo , to programmer_humor in ifn't
@AlmightySnoo@lemmy.world avatar

reminds me of #ifndef instead of #if !defined(…)

lobsticle , to programmerhumor in advanced

Very disappointing not to see an 0 (my personal go-to for decades) in this meme. 😞

Magister , to programmerhumor in advanced
@Magister@lemmy.world avatar

this is what I’m doing too, so at least it’s not compiled and better than a /* */ as you can keep all the code intact in your 0

AlmightySnoo , to programmerhumor in advanced
@AlmightySnoo@lemmy.world avatar

A simple if (false) will get optimized out by any modern C or C++ compiler with optimizations on, but the problem is that the compiler will still parse and spend time on what’s inside the if-block and it has to be legal code, whereas with the #if 0 trick the whole thing gets yeeted away by the preprocessor before even the compiler gets to look at it regardless of whether that block contains errors or not, it’s literally just a string manipulation.

Duralf , to programmerhumor in advanced

I think you missed the whole point of my comment 😂. Regardless, the time spent compiling a small snippet of code is completely negligible. In the end, both #if 0 and if (false) have their complimentary uses.

tanyagold , to bookstodon
@tanyagold@mstdn.social avatar

I've got an unexpected opening in my editing schedule starting mid-August. I'd love to fill it with:

✨ a queer story ✨
or
✨ an unsettling horror novel ✨
or
✨ a multimedia or branching story ✨

I do SFF/H, commercial/lit fic & memoir dev/line edits.

Wanna work with me? ⬇️
TanyaGold.com/contact

Wanna learn more about how I can help? ⬇️
TanyaGold.com

@edibuddies @diversebooks @writers @bookstodon @lgbtqbookstodon

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines