---
title: "Discussion on \"Liskov Substitution Principle Isn’t Complex. Just Give It a Try\" | Hashnode"
description: "Discussion on \"Liskov Substitution Principle Isn’t Complex. Just Give It a Try\". It is common among developers that Liskov Substitution Principle is difficult to understand, Is that true? Let's know the truth"
url: "https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Liskov Substitution Principle Isn’t Complex. Just Give It a Try](https://mayallo.hashnode.dev/liskov-substitution-principle-isnt-complex-just-give-it-a-try?utm_source=hashnode&utm_medium=feed)

It is common among developers that Liskov Substitution Principle is difficult to understand, Is that true? Let's know the truth

Jan 4, 2023 · 13 min read · mayallo.hashnode.dev  
Updated Apr 18, 2023  
Read the article

-   [#solid-principles](https://hashnode.com/tag/solid-principles)
-   [#design-patterns](https://hashnode.com/tag/design-patterns)
-   [#coding](https://hashnode.com/tag/coding)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Mohamed Mayallo](https://hashnode.com/@mayallo)

@mayallo

  
[View profile](https://hashnode.com/@mayallo)

Self-taught Software Engineer

I'm a Software Engineer Passionate about Clean Code, Design Patterns, and System Design. Learning something new every day. Feel free to say Hi on LinkedIn at https://www.linkedin.com/in/mayallo

## Responses 2

Markdown supported · ⌘↵ to post

[Carlos Andrés Sierra Betancur](https://hashnode.com/@carlossierra311)

[Jan 18, 2023](https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a/comment/63c80175afd2f07b22630688)

Thanks for the article. One quick question though: isn’t the example in “Covariance of Return Types” violating the “Countervariance of Method Arguments”? The subtype can only receive strings, but the super type can also receive numbers.

[Mohamed Mayallo](https://hashnode.com/@mayallo)

[Jan 22, 2023](https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a/comment/63c80175afd2f07b22630688#reply-63cd5500cc7a92b9f77dd014)

Thanks a lot, Carlos. You are right, the example was a little confusing. I have just edited it. Thanks for your valuable feedback.

[Adrián RC](https://hashnode.com/@achito)

[Jan 10, 2023](https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a/comment/63bd7a2655c009e4115859d7)

Very good article!

I'm confused with "Strength Class Invariants" and "Weakens the precondition". With those examples it looks like a contradiction.

[Mohamed Mayallo](https://hashnode.com/@mayallo)

[Jan 22, 2023](https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a/comment/63bd7a2655c009e4115859d7#reply-63cd5b40c94895c1eb7eb92b)

Thanks Adrián, If you mean the logical conditions, I have just edited it.

[Adrián RC](https://hashnode.com/@achito)

[Jan 22, 2023](https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a/comment/63bd7a2655c009e4115859d7#reply-63cd5f25c94895c1eb7eba08)

Thank you [Mohamed Mayallo](https://hashnode.com/@mayallo) I learned a lot with your blog. Thank you.

[Mohamed Mayallo](https://hashnode.com/@mayallo)

[Jan 22, 2023](https://hashnode.com/posts/liskov-substitution-principle-isnt-complex-just-give-it-a-try/63b5141b7b3bb7a58e4b094a/comment/63bd7a2655c009e4115859d7#reply-63cd6170c94895c1eb7eba6a)

Really, thank you [Adrián RC](https://hashnode.com/@achito). I am so pleased to know that. Actually, such valuable feedbacks encourage me a lot.
