How can I avoid repeating code in a conditional?

I’d say that scope is roughly 20 executed lines, more or less. Anything past that and it becomes increasingly difficult to justify not using objects.

Another way to think of it is this, if the whole task could be covered by a class with a single method it’s probably better off being left as a straight procedure.

2 Likes