Re:OOP Is Dead, Long Live OOP
by Ace17 on Friday October 19, 2018 @01:29AM
(#18254417)
This is not so simple.
What about "NullLogSink" and "StdoutLogSink", both being implementations of "ILogSink"?
Classes are very well suited to statically formalize the communication points (aka "interfaces", "protocols") between the various parts of your program.
The fact that a concrete class might have a state is actually irrelevant (indeed, we generally make all of our data members "private").
Classes are very well suited to statically formalize the communication points (aka "interfaces", "protocols") between the various parts of your program.
The fact that a concrete class might have a state is actually irrelevant (indeed, we generally make all of our data members "private").