E
Ersek, Laszlo
Kaz Kylheku said:Sure, you can always put together a portability programming
tournament, where everyone pays to enter, and the winner fetches a
monetary prize.
The same economic factors as in poker, golf, competitive road running,
etc.
In actual software, maximal portabilty is the enemy of portability.
If you are paid in the long term to bring the best out of any given
platform, then again to port the program to the next platform when your
customer changes platforms, then you are right, and I think I agreed to
that before.
OTOH, you seem to say that software developed along different incentives
is not "actual software". I disagree. If it gets the work done reliably,
it is actual software.
(I'm reordering quotes from your post.)
For instance, throughout this thread you've been advocating the
addition of /completely unnecessary/ code (bearing unnecessary risk)
to a program for the sake of portability.
For my situation that code (and the resultant risk, if any) is not
unnecessary and not without reward. I think that code will help me catch
bugs and/or, as you say, increase portability. Portability helps me
decrease the burden of maintenance and porting, and after correctness,
that's my ultimate incentive -- no maintenance. I code C first and
foremost to scratch my itches -- I'm currently hired to do different
stuff. I don't want to hack continuously on those solutions as I wander
among platforms. If somebody else finds my code useful, that's a big
additional benefit, but not the main motive.
I will sacrifice performance and features in order to deliver myself
from maintenance burden. You might implement tight loops in assembly, or
use platform-specific async IO. I will write that loop in C and call
select() and be done with it. I will reimplement functionality that has
been available in glibc for 15 years, if it's not in SUSv2. You might
come up with an elaborate subsytem of pluggable modules to collect /
mask implementation-dependent behavior. I'd rather avoid (work around)
such behavior.
If I had to ask the sysadmin to install a new version of gcc, because my
code relies on gcc extensions, or had to install gcc under $HOME myself,
that would immediately qualify as a lost cause. While in a professional,
paid-for setting, nothing should be more natural (ideally) than choosing
your tools.
Does this make my code non-actual? I don't think so. (Even though it
could obviously never compete with software written by a skilled, hired
dev team.)
I didn't say anything about less work. A lower /level/ of reasoning
doesn't translate to less work.
How can it ever be less straining to add more code, compared to not
adding it at all?
Any monkey can read a couple of ISO standards a few times over again
and learn to spot nonportability in code.
I strongly disagree. Most "monkeys" can't be bothered to read *any*
documentation at all. Even if they read tutorials and references, and
even if they have no difficulty implementing all kinds of algorithms
with procedural/imperative language constructs and a bit of dynamic
dispatch, they mostly hit rock bottom when they face "undefined
behavior" and "why doesn't it work on Solaris, it worked on Linux".
Obsessing about standards is tedious, boring and busywork, not noble or
creative in the least, but with my incentive in mind, it's of paramount
importance. (And it still requires more concentration than a "crossword
puzzle" -- I can tell, I do both.)
``Hey look, that text stream was closed and a few lines before it,
it's clear that the last character written wasn't a newline! I'm so
smart!''
Mock as much as you like, this is not done for circle-jerking purposes.
Have a nice day,
lacos