Compare commits

..

1 Commits

Author SHA1 Message Date
deAdvance 2adc864c78 Fixed capitalisations, added missing bits 2021-12-31 11:38:30 +00:00
1 changed files with 5 additions and 8 deletions

View File

@ -27,16 +27,13 @@ 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.
@ -44,20 +41,20 @@ title = "Why python is a bad language"
- Variables don't need to be declared. This leads to many issues, such as accidentally overwriting other variables with the same name, or typos going undetected.
- A variable's type may be changed after its assignment, making it harder to work with.
{{ sec_header(name="Poorly done Classes") }}
{{ sec_header(name="Poorly Done Classes") }}
- The `self` parameter being passed into functions explicitly is pointless boilerplate. Instead it should just be there implicitly, and static functions should be declared with a keyword such as `static`.
- Fields do not need to be declared. This leads to issues mentioned before. It also makes the data a class stores undefined, making it harder to work with. It is recommended to declare fields, but unfortunately not enforced.
- 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. 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.
- Python is seen as "the beginner's language", and it really should not be. It doesn't teach important concepts, and is way too simplfied.
- 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 and quick scripts you'll only use like 5 times, 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") }}