rm -rf $path
to go from working one day to having deleted an entire directory tree just because someone named their file "foo ."I'm not sure how not having a type system is safer than having a type system. What makes it feel more dangerous?
Bash is weakly typed, which is a different concept than dynamic typing.
Dynamically typed languages prevent bugs that weakly typed languages don't, so from this point of view, the latter are unambiguously "more dangerous" than the former.
Technically speaking, even languages with strong safeguards (random examples: Golang, Rust) can't "guard against runtime errors", because it's possible to panic a program by performing an out-of-bounds array access (which classifies as "runtime error" in a very strict sense).
A concept that makes sense is the amount of safeguards provided by a language (/type system), however, this depends entirely on the use case; it's an intentional choice of the developer.