Topic: Balance between storage of variables in fields of a class and beauty of the code.
There is a long sausage the code which operates with contexts, and arrays (common example) At a rewriting in with ++ the code by mind it is necessary to envelop each essence in with ++ object and to operate with it, but we lower the given approach. I want to break the code into small methods till 5-10 lines, no more. Obviously, there are many entering and quitting variables. It is possible to register all proceeding variables in fields of a class and to work with them. Or evidently to receive at an output from function all values in not which type of structure. In the first variant suffers both readership of the code, and connectivity. The second variant is much more elegant, perfectly we test but the sensation is added that it not the approach and can be made OOP somehow differently. And as though you made?