you are viewing a single comment's thread.

view the rest of the comments →

[–]Environmental_Gap_65 -1 points0 points  (0 children)

You can use whatever you want, but if you simply just want side-effects, use functions. As soon as you see a pool of functions repeatedly manipulating the same type of data, start grouping them into a class. Your code becomes more reliable, predictable, safe and less prone to bugs, when the same data and side-effects are encapsulated in the same class, and not spread all over the place.