3 ms·
POSIX allows implementations to have extensions, and almost all implementations have extensions. There are good reasons for many of those extensions. Many opt
by dwheeler 5y ago
POSIX allows implementations to have extensions, and almost all implementations have extensions.
There are good reasons for many of those extensions. Many options implement capabilities that probably should be in the standard, but currently aren't. For example, POSIX doesn't have easy-to-use secure options for handling file names; attackers can insert newlines in filenames, yet POSIX lacks options like find -print0 and xargs -0, so you either spend a great deal of additional time writing complicated code that's likely to be insecure, or you simply use extensions as almost everyone actually does. Even the BSDs and busybox include those examples, by the way. Also, long option names are excellent for making scripts easier to understand, and really should be in the
POSIX standard for systems that are not highly memory constrained.
I try to make my shell scripts portable when that is reasonable, but sometimes that is simply far too difficult. The minimalism of POSIX is an advantage on small systems, or in other constrained environments, but most of us today are not trying trying to write software for a PDP-7.
In most cases the scarcest resource is developer time. In that case having rich functionality and extensions that improve readability is more important. I think the market is being perfectly reasonable, minimalism is less important than developer efficiency in most cases. Your mileage may vary.