Subclassing to avoid line length
- by Super User
The standard line length of code is 80 characters per line. This is accepted and followed by the most of programmers.
I working on a state machine of a character and is necessary for me follow this too.
I have four classes who pass this limit.
I can subclass each class in two more and then avoid the line length limit.
class Stand
class Walk
class Punch
class Crouch
The new classes would be StandLeft, StandRight and so on. Stand, Walk, Punch and Crouch would be then abstract classes.
The question if there is a limit for the long of the hierarchies tree or this is depends of the case.