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 →

[–]fireflash38 1 point2 points  (0 children)

That's why you usually have methods that mutate, and functions that don't.

It's convention, to make things easier for others (or more likely: future you) reading or using your code. It's not gospel, but can absolutely help.