Compare commits

...

5 Commits

1 changed files with 7 additions and 4 deletions

View File

@ -27,13 +27,16 @@ title = "Why python is a bad language"
{{ sec_header(name="Lacking Features") }}
- Lambdas are a poorly implemented afterthought.
- There is absolutely no `switch` statement or anything along those lines, leading to absolutely **HUGE** `elif` blocks!
{{ sec_header(name="Intepreter") }}
- Intepreters lead to runtime errors which could otherwise be detected at compile time. This often causes bad errors to make it into production due to untested edge cases.
- **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.
@ -47,14 +50,14 @@ title = "Why python is a bad language"
- Enums are basically just classes, and are yet another lazy afterthought.
{{ sec_header(name="Wide Spread Because Of The Wrong Reason") }}
- Python is seen as "the beginner's language", and it really should not be. There is practically
- As said earlier on this website, Python has numerous issues that stop the newbie from quickly getting used to other PLs, by lacking basic functions.
- Python is seen as "the beginner's language", and it really should not be. As said earlier on this website, Python has numerous issues that stop the newbie from quickly getting used to other PLs, by lacking basic functions.
- Python should only be used if you wanna handicap yourself into an inferior PL, just to see what you can do. No more, no less.
{{ sec_header(name="Other Issues") }}
- Strings can be evaluated as code, also encouraging spaghetti code.
- Doc comments are available at runtime using `help(element)`, and they should not be, because this too encourages spaghetti code.
- The command line REPL prints `Use exit() or Ctrl-Z plus Return to exit` for no reason, instead of simply exiting.
- Operator chaning often works in completely nonsensical ways. For example `False == False in [False]` is treated as `False == False and False in [False]` and not as something that makes sense such as `(False == False) in [False]` or `False == (False in [False])`.
{{ sec_header(name="Conclusion") }}
@ -62,4 +65,4 @@ Python is a bad programming language that no one should use. Please don't hesita
And, one more thing:
Please spread the site so more people know the truth. It would mean the world to me. Thanks.
Please spread the site so more people know the truth. It would mean the world to me. Thanks.