Surely you wouldn’t argue that Rust or C++ would be a more appropriate alternative in that kind of role because they’re statically typed.
Not C++. Rust hopefully, when cargo script is stabilised!
Until then I strongly prefer Deno (which is also statically typed) for ad-hoc scripting. Python is surprisingly bad for that use case despite it being super popular for it because:
- There's no way to use third party dependencies reliably from a single-file scripts. You're limited to the standard library, or setting up a whole pyproject.toml, venv and so on.
- You can't import files by relative file path like you can in Deno, Zig, and Rust (sort of; it's slightly hacky). That leads to people doing hacks to PYTHONPATH or importlib which completely breaks all tooling.