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.
13
u/perlgeek May 28 '14
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.