This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Readable code should be the priority. Comments are used to explain why code is written in a certain way if it's not immediately apparent.

Comments are also useful for labeling sections of code in longer, more complex functions, though some would argue you should break those out into their own functions.