Vertical vs. Horizontal Decomposition of Responsibility

Objects responsible for too many things are a problem. Because their
complexity is high, they are difficult to maintain and extend.
Decomposition of responsibility is what we do in order to break
these overly complex objects into smaller ones. I see two types of this
refactoring operation: vertical and horizontal. And I believe
the former is better than the latter.

Obviously, objects of this class are doing too much.
They save log lines to the
file and also format them—an obvious violation of
a famous
single responsibility principle.
An object of this class would be responsible for too many things.
We have to extract some functionality out of it and put that
into another object(s). We have to decompose its responsibility.
No matter where we put it, this is how the
Log class will look after the extraction:

See why it's horizontal? Because this script sees them
both. They both are on the same level of visibility. We will always have
to communicate with both of them when we want to log a line. Both
objects of Log and Line are in front of us. We have to deal with
two classes in order to log a line:

The responsibility is decomposed vertically. We still have one entry point
into the log object, but the object "consists" of two objects, one wrapped
into another:

In general, I think horizontal decomposition of responsibility is a bad idea,
while vertical is a much better one. That's because a vertically
decomposed object decreases complexity, while a horizontally decomposed
one actually makes things more complex because its clients have to deal with
more dependencies and more points of contact.