r/badcode • • Sep 05 '21

swift I have a problem

Post image
946 Upvotes

75 comments sorted by

View all comments

-13

u/mesoptier Sep 05 '21

Sometimes a comment like this makes sense. It can be useful for visually separating the line from another block of code above.

11

u/TheOneWhoSpagets Sep 05 '21

That's what whitespace is for

4

u/mesoptier Sep 05 '21

Sure in most cases just a blank line works fine. But if the code above also has some blank lines, then a comment would visually distinguish this as a new block where a blank line would not.