I'm just addressing the posters comment on statically typed langauges. Not saying anything about "pretenses".
>Out-of-bounds array access is undefined behaviour in C++, but that isn't a result of C++ being statically typed. If you want a statically typed language with bounds-checked arrays, look at Java, Ada, or Rust.
Yeah I know.
>Again this doesn't generalise to all statically typed languages.
I never said this. I am just commenting on the opposite generalization the poster I'm replying to made. In general statically typed is safer the dynamically typed but this doesn't apply to all actual languages with these properties. There are actual statically typed languages like C++ that are less safe then a dynamically typed language like python.
>Also, Python isn't untyped, it's dynamically typed.
This is just a semantic mistake. Clearly I meant dynamically typed. Not untyped. But I hope people get the meaning.
>How is JavaScript different from Python here?
Javascript doesn't crash as much as python. For example Calling someHashTable[nonexistentKey] in javascript returns a value that can actually be propagated far along into the datapath before throwing an error. IN python that's an instant crash. This makes python much easier to debug then js. I use the words less error prone, because python in the long run ends up having less errors due to creators implementing failures that happen quickly and early.
>I'm not sure I follow, what doesn't depend?
Statically typed languages prevent run time errors related to types. I am saying that while this is great this property isn't that important then errors that are easily traceable.
What's by far more important is that even if the programming language has many holes where run time errors can occur it is better just to have those runtime errors easily traceable to the source of the error. The existence of errors that are hard to trace in C++ actually makes it much much less safe then python despite the extensive type system. It indicates that type safety is much less important.