3 ms·
>Python is untyped and untestable. Completely untrue. You're conflating static typing with strong typing. And pytest is a great test framework. And you're rec
by _dain_ 4y ago
>Python is untyped and untestable.
Completely untrue. You're conflating static typing with strong typing. And pytest is a great test framework.
And you're recommending shell for better typing and testability? The language where everything is a string, there are no proper arrays, and functions don't have local variables? You have to be trolling.
- oweiler 4y agoOn top of that, fn in Bash can only return their status code. Yes, command substitution exists but is full of footguns.
- hedora 4y agoI’ve probably spent two weeks (80+ active hours) debugging stuff like ‘“” is not None’. At this point, I’d prefer a language with only string types to one that only checks types in production. pytest is terrible, at least from how I’ve seen people use it. It hides the diagnostic error explaining why the test failed in a random place. Its output is not parseable. If you have a long running test that times out, then it buffers the stdout and stderr so you have to wait for the fallback test time out every. single. time.
- Too 4y agoYou've got exactly same problem of undefined vs empty in sh (-n not being exact inverse of -z vs string comparision with != "", different behavior if -u is set, etc). Just check the stackoverflow answers on how to test if a bash string is empty or undefined and there isn't even consensus on what is the best way to do it. Mypy has had strict Optional checking on as default since 2018, almost entirely eliminating any None-related errors, meaning it is actually stricter and safer than Java or other traditionally considered static languages in that regard, (bar any dynamic misuse in deserialization boundaries). Assuming you use mypy of course, but that's a given today imo, like using shellcheck is for sh.