SOLID, SRP, IComparable

OK, it implements IComparable and other interfaces (like IDisposable) in one class for violating the SRP principle .

SRP states that each class must implement the responsibility of the signature and the methods must be largely interconnected to achieve entire classes .

Is another responsibility compared?

Some clarifications would be appreciated.

+4
source share
2 answers

, SRP, , , , . , , , ? IComparable, , . , SRP, , IComparable . , -, . , , , , , . IComparable , , , , , , , .

+4

, Imomparable IDisposable , SRP.

SRP ( , ). -, . , , .

, SRC, " " . "", , , .

IComparable/IDisposable , (-) , ( ).

+3

Source: https://habr.com/ru/post/1651935/


All Articles