Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antolius/liskov-principal-violation-example
An example app that illustrates the violation of Liskov substitution principal, written in several languages.
https://github.com/antolius/liskov-principal-violation-example
Last synced: 25 days ago
JSON representation
An example app that illustrates the violation of Liskov substitution principal, written in several languages.
- Host: GitHub
- URL: https://github.com/antolius/liskov-principal-violation-example
- Owner: Antolius
- License: mit
- Created: 2020-08-31T18:39:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-31T19:24:23.000Z (over 4 years ago)
- Last Synced: 2024-10-25T09:16:41.891Z (2 months ago)
- Language: C
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Liskov principle violation example
An example app that illustrates the violation of Liskov substitution principal, written in several languages.
This is a companion repository to a blog post on Liskov substitution principle that you can read [here](https://qua.name/antolius/liskov-substitution-principle). It contains the same example app written in C, Vala and Python. You can run each of them and should get the same result.
## Running examples
You can compile and run `app.c` with:
```bash
gcc `pkg-config --cflags gtk+-3.0` -o app app.c `pkg-config --libs gtk+-3.0` && ./app
```To compile and run `app.vala` execute:
```bash
valac --pkg gtk+-3.0 app.vala && ./app
```Finally you can run `app.py` with Python 3:
```bash
python app.py
```All app versions should compile successfully and fail with segmentation fault at startup.
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Authors
- Josip Antoliš - [Antolius](https://github.com/Antolius)