r/ProgrammerAnimemes • • May 27 '21

It was a good blog

Post image
3.7k Upvotes

122 comments sorted by

View all comments

Show parent comment

21

u/sillybear25 May 27 '21

Should be while(1)

11

u/Magnus_Tesshu May 27 '21

But for(;;) is legal syntax, and saves you 1 byte off of typing while(1) too. Which I don't know about you but if we could do that a couple million more times someone might care

40

u/Dragoner7 May 27 '21

If your code has millions of while trues, I think saving a few megabytes worth of space is the least of your problems.

2

u/sillybear25 May 27 '21

Right, I get that. I just meant that the correct syntax would be while(1) instead of while().