Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface Segregation Principle design flaw #147

Open
namagi opened this issue Mar 4, 2018 · 4 comments
Open

Interface Segregation Principle design flaw #147

namagi opened this issue Mar 4, 2018 · 4 comments

Comments

@namagi
Copy link

namagi commented Mar 4, 2018

In ISP there are severe design flaws which clearly indicate you have no experience with goverment employees:

class Human implements Employee
{
    public function work(): void
    {
        // ....working  --> instance would likely throw UnknownOperationException
    }

    public function eat(): void
    {
        // ...... eating in lunch break --> entire working hours IS-A lunch break; it may or may not have anything to do with eating
    }
}

Also, in Good: Not every worker is an employee, but every employee is a worker. --> Again, you have not met goverment employees.

All this makes it confusing to grasp the concept for some instances 😉

@peter-gribanov
Copy link
Contributor

You always can give another example in PR

@spacemudd
Copy link

spacemudd commented Mar 5, 2018

Surely this baseless issue is not serious, right? 😅

The example about ISP is an example of ISP. Not an example about working with private/govt. employees. It's succinctly explained without building an authentic, ready-for-production interface, haha.

which clearly indicate you have no experience with goverment employees:

I really believe this issue is a joke? haha

@archfrog
Copy link

Was laughing ... a bit :-) Besides, shouldn't it be class Employee implements Human?

But yes, I think somebody had success in being funny.

@peter-gribanov
Copy link
Contributor

Besides, shouldn't it be class Employee implements Human?

@archfrog no, because it is not a human in global context, but a human in context of employees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants