Hacker News new | ask | show | jobs
by Argorak 3949 days ago
Shell scripts have a lot of implicit dependencies.

They string together other programs with widely differing interfaces. For example BSD sed and GNU sed work very differently, at least when you accidentally use a non-standard option.

Ruby, JavaScript, Perl, Python, Java, C++ all have a stable base vocabulary (core library).

bash doesn't.

2 comments

Speaking of implicit dependencies, here are a few: env, path, any executable file either in the current directory or in the search path. env = functions and aliases, and can be modified by any shell script. The path is an implicit dependency in the sense any chmod +x files in any of these directories can affect the shell. Which means the shell is also dependent on the file system itself.
True enough, though as soon as you have dependencies, you can't guarantee cross-platform or cross-version portability with those other languages either.
They all come with a dependency manager and the problem of sh (or bash? got your bashisms ready all the time?) is that the moment of introducing dependencies is "immediate".