O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ISP

The ISP states that many client-specific interfaces are better than one general-purpose interface. In other words, no client should be forced to depend on methods that it does not use.

In essence, ISP is a restatement of the SRP for interfaces and reflects the same underlying problem--the difficulty of balancing responsibility assignment, composition, and encapsulation in object-oriented design. On the one hand, it is desirable to encapsulate; on the other hand, it is desirable to compose. Furthermore, the problem with employing the ISP alone is that it doesn't directly protect against large classes and in some ways hides the problem.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required