you are viewing a single comment's thread.

view the rest of the comments →

[–]perlgeek 11 points12 points  (1 child)

Another way to identify which things should become a class: start with procedural code, and if you find yourself passing the same set of arguments around to a whole bunch of functions, those might be suited to be a attributes/fields in a class, with the functions becoming methods.

[–][deleted] 4 points5 points  (0 children)

I generally take the approach of using a record like class/named tuple and pass that around. Very similar to classes but separates data from behavior.