r/programming • • May 28 '14

"Compression-oriented programming" - Casey Muratori's blog

http://mollyrocket.com/casey/stream_0019.html
125 Upvotes

67 comments sorted by

View all comments

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.

5

u/[deleted] May 29 '14

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.