add error handling section
continuous-integration/drone/push Build is passing Details

This commit is contained in:
LordMZTE 2022-10-25 14:56:34 +02:00
parent 2519235497
commit 8305a761a4
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ title = "Why python is a bad language"
- **Very bad** performance.
- Python is hard to package. Of course tools exist that can do it, but they are slow and large as they always include the interpreter as opposed to compiling the code or using some sort of faster intermediate language. Packaged python also includes the source code, which may be undesirable.
{{ sec_header(name="Error Handling") }}
- It has exceptions! The second most common mistake in OOP languages after `null`! Exceptions make error handling inherently unsafe, as there is no knowing when an exception might come flying at you!
- `ExceptionGroup`s (introduced in 3.11, preview version at the time of writing) make this mess of exceptions even more intertwined. Error spaghetti, anyone?
{{ sec_header(name="Dynamic Typing") }}
- Passing an invalid type into a function may cause unpredictable behaviour. Manual type checks are annoying, and type hints are still just hints.
- It is often unclear what type a function is expecting, thus it can be hard to know how to call it, especially if it is undocumented.