Hello,

On Sat 19 Apr 2025 at 11:42am -04, Michael Stone wrote:

> You happened to pick two of the most compatible OSs--it's not hard to
> be portable between linux & freebsd *by accident* as there's a long
> history of cross-pollination between them. (E.g., coreutils routinely
> looks to see what parameters freebsd used when implementing a new
> feature.)

Fair point, though, I also use these programs on some NetBSD systems,
and my experience was that until I started paying attention to POSIX I
was continually using various features that weren't present over there.

> Expand the problem set to include running on SunOS and AIX and OSX and
> QNX and ... and the problem becomes much harder. But if you don't care
> about all those oddballs, why limit yourself to POSIX--whose point was
> to try to enable that degree of cross-platform interoperability?
> [...]
> It's just one of those things where regardless of what standard you
> are writing to, you still need to check to see how reality matches the
> standard.

The nature of these particular programs is that I might want to be able
to run them on those platforms in the future.
If I've already stuck to POSIX when writing them, then porting them to
those more difficult platforms should be much easier.

I'm a big fan of not putting up barriers to making programs portable in
the future, even if you haven't gone to the effort of really making sure
they're portable yet.

Also, I have to admit, I found it a lot of fun trying to figure out how
to make these programd performant enough with only POSIX facilities.

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to