One of the holy cows here is this "portability" stuff.
snerk
In practice, portability means:
1) Use the least common denominator of all the supported
systems.
Real-world example: I worked on a system that had to run on Windows
3.1, Solaris, and Classic MacOS concurrently. I had this wonderful
idea to use enums to store a series of bit masks. Unfortunately,
these bitmasks were 32-bit, and while MPW supported 32-bit enums, MSVC
did not. So much for my great idea.
LCD is the minimum that the Standard mandates (in this particular
case, the minimum is 16-bit enums).
2) Between usability / good user experience and portability
always choose portability since this minimizes programming
effort
It *is* possible to deliver both usability *and* portability; I've
done it. That same project used a third-party library for GUI
development that mimicked the native look and feel for each platform.
People sitting on Windows thought they were using a regular Windows
app, people sitting in front of a Mac thought they were using a
regular Mac app (if you were willing to ignore a couple of minor
glitches), and people sitting on Solaris thought they were using a
regular OpenLook app. All used the same code base.
Absent such tools, it's possible to factor out the platform-specific
sections, and keep the core application code platform-agnostic.
Portability is *not* a binary condition; it's a matter of degree.
This leads to mediocre software that runs anywhere but that nobody uses
because it is just that: MEDIOCRE.
I will gladly put up anything I wrote in the '90s as an example of
code that was *not* mediocre.
And often not relevant. The bulk of the code I've written in my
career had no GUI.
Network?
Non portable.
Ditto.
This obsession with portability as the *only* way to measure software
has been carried out into this group
*Nobody* in this group has claimed portability is the *only* way to
measure software; however, for many of us who've been doing this for a
living, it is a major concern. In almost 20 years, I've worked on 1,
count 'em, *1* system that did not have to support multiple platforms
concurrently. And I'm not talking about embedded systems, or exotic
platforms; I'm talking Windows, MacOS, *nix.
My priorities are different
1) Correct software, few bugs
2) Good user interface, good performance.
3) Small software, avoiding bloat
4) Portability
We *all* strive for correctness, performance, etc.