Sean Whitton <spwhit...@spwhitton.name> writes: > Hello, > > On Fri 18 Apr 2025 at 08:18am -04, Michael Stone wrote: > >> On Fri, Apr 18, 2025 at 02:52:17PM +0800, Sean Whitton wrote: >>>On Thu 17 Apr 2025 at 08:02pm -05, Richard Laager wrote: >>>> So, personally, I think getting mktemp(1) added to POSIX would be >>>> better for portability in the long run anyway. >>> >>>Eventually. POSIX.1-2017 is going to be the thing to target for a long >>>time, I think. >> >> I think POSIX is mostly a relic, and not worth worrying about except as one >> of >> many inputs. Too many mistakes were made too early on, and it's just too late >> to get everyone to agree on a common standard because real world >> implementations diverged in too many ways. If someone wants to make a program >> that works reliably across platforms sh isn't the right tool in 2025. (And I >> say that as someone who quotes POSIX regularly: it has value for things like >> choosing amongst a set of possible implementations, but not for making >> assumptions about what will work in the real world.) > > I have interpreted scripts that I want to run on any FreeBSD and Debian > machine, because they are part of my OS bootstrapping. What else is > there than POSIX sh for this? Therefore, it's still relevant.
I think some reasonable subset of POSIX sh is all you can/should assume these days, everything else needs to be documented and installed as dependencies. Even (what used to be) common tools like awk, cmp, diff, join have disappeared from various distributions. Guix proved that a /bin/sh-only approach is possible and usable. I have mixed feelings about this minimization pattern -- it is often combined with replacing copyleft software with non-copyleft implementations (GPL -> LGPL/MIT) -- but I can't deny that I find minimal containers really useful. /Simon
signature.asc
Description: PGP signature