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

LG 03-07: remove Liskov-Substition-Principle from this LG #509

Closed
gernotstarke opened this issue Sep 10, 2024 · 11 comments
Closed

LG 03-07: remove Liskov-Substition-Principle from this LG #509

gernotstarke opened this issue Sep 10, 2024 · 11 comments
Assignees
Labels
bug Something isn't working learning content the learning content needs polishing, rework or otherwise needs attention V2025 Release 2025

Comments

@gernotstarke
Copy link
Member

In my opinion, Liskov has nothing to do with the (general) design of interfaces.

Suggestion is to remove it from THIS learning goal
AND to remove the literature reference.

@gernotstarke gernotstarke added bug Something isn't working learning content the learning content needs polishing, rework or otherwise needs attention V2025 Release 2025 labels Sep 10, 2024
@gernotstarke gernotstarke self-assigned this Sep 10, 2024
@mikesperber
Copy link
Contributor

LSP is about specifications, and interfaces are (partial) specifications, so I respectfully disagree.

Quoting Liskov's paper:

This paper defines a new notion of the subtype relation based on the semantic properties of the subtype and supertype. An object’s type determines both a set of legal values and an interface with its environment (through calls on its methods).

@gernotstarke
Copy link
Member Author

gernotstarke commented Sep 11, 2024 via email

@mikesperber
Copy link
Contributor

but the learning goal relates to interfaces as in API… as far as I interpret it…

Sure ... why would that make a difference?

@gernotstarke
Copy link
Member Author

Because the general notion of collaboration between components has nothing to do with subtyping and supertypes.
Liskov is concerned with very specific stuff from (old-school) OO, where (implementation-)inheritance was a major topic.
(which in my observation it is no longer... as interface-inheritance and delegation took over. That is why I consider Liskov to be overly specific in that topic.

In case we want more content on interfaces, I suggest the book from Olaf Zimmermann et al: Patterns of API design, Addison-Wesley 2023.

@mikesperber
Copy link
Contributor

We seem to be reading two different paper:
The LSP is about behavior and its specification in a very general sense, definitely still relevant.
(The word "inheritance" does not even appear in the body of the paper.)

@gernotstarke
Copy link
Member Author

Then we definitely need to reference THAT paper...

@alxlo
Copy link
Contributor

alxlo commented Sep 17, 2024

By what means does it help us in the FL training to be super-correct about the scientific origin while many students we have to pick up from the point that they associate this idea with OO programming.
Yes, LSP works very well without talking about inheritance. From my understanding it's about using Abstractions and Specializations in a way that doesn't create undesirable side-effects. Inheritance is just one way to model abstractions and specializations. It works with interfaces as well and has a lot to do with reducing leakyness in abstractions.
And yes, when your abstraction is to leaky (or violates the LSP) then either your abstraction is incomplete or not fit for the purpose - that is, you have a horrible interface with horrible implementations. . https://beza1e1.tuxen.de/leaky_abstractions.html

Maybe we replace "Liskov’s substitution principle [Liskov 1994] as a way to achieve consistency and conceptual
integrity (R3)." with " Strive for consistency an conceptual integrity by considering the LSP (ref) and by minimizing leakyness (ref)"

@claudineallen
Copy link

Hello everyone. I am just joining the conversation and perhaps a bit late. The new version definitely flows better than the previous logically. In particular, am happy to see that the study on quality requirements and constraints is introduced before the section on evaluation and that we now explicitly mention evaluation of the software architecture with specific reference to quality requirements. I suggest we include Liskov substitution under conceptual integrity in LG-03-04. It can then also be referenced in the discussions under LG-03-07 in the manner suggested by alxlo. In both cases this can be (R3). Thanks to all those who have put so much effort into this work.

@rhoadesre
Copy link
Contributor

I'm also of the opinion, that Liskov should be removed here. It seems my understanding is also different than Mike's.

@gernotstarke
Copy link
Member Author

I moved the sentence

** Liskov's substitution principle <> as a way to achieve consistency and conceptual integrity (R3).

to LG-03-04 under conceptual integrity.

programming-wolf added a commit that referenced this issue Oct 8, 2024
moved the liskov-sentence from LG-03-07 to LG-03-04
@gernotstarke
Copy link
Member Author

PR: #563 has been merged. Closing this issue.

@github-project-automation github-project-automation bot moved this from Implementation In Progress to Done / Implemented in V-2025 Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working learning content the learning content needs polishing, rework or otherwise needs attention V2025 Release 2025
Projects
Status: Done / Implemented
Development

No branches or pull requests

7 participants