News for hackers. Stuff that matters.
Re:Function Length by Veedrac on Friday December 02, 2016 @04:44AM (#13087342)
Multiple shared parameters up is a strong motivation to create a composite type, yes, but one should not instantly jump to making the functions methods of the class. In your example it makes sense, but there are equally many cases it does not. Shared state and shared behaviour are two entirely independent concerns.
Re:Function Length by chillacy on Friday December 02, 2016 @03:37PM (#13092074)
Yes, I was responding to what I assumed was the parent's concern that passing state into a function was a hassle. One of the sources which influenced my tastes is Robert Martin's Clean Code.