Subject: Re: __progname (was Re: audit of syslog(3) usage...)
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 01/26/2001 16:21:12
>>> 		const char *__progname
>>> 		const char *getprogname(const char *argv0)
>> I would hope not.  Speaking with my application-author hat on, one
>> of the biggest wins of __progname is that it *doesn't* require me to
>> preserve argv[0] from main down to the usage point [...].
> Well, as an application author who pays a great deal of attention to
> portability I can say authoritatively that __progname is totally
> useless to me -- it is not portable and probably never will be.

Never using less-than-fully-portable features is a good way to never
make any progress.  Why not add this feature?  Because nobody else has
it, so it's not portable, so nobody will use it.

New features have to be introduced *somewhere*, and *someone* has to
start using them before they get adopted everywhere.  The computer
world is littered with stuff conjured into existence and specified
before it was ever used, and in almost every case - certainly every
case that comes to mind - the result is dead in the water, or at best
sinking despite being propped up by someone.

I (usually) write in gcc, not C, and make no apology for it.  I use
pread(2) and pwrite(2) when convenient.  I use sockets.

...and I use __progname.

> Unfortunately not all application programmers are so keen to keep
> *all* of the code they work with as totally portable as I am.

There is no such thing as totally portable code.  If nothing else,
there is no language supported across all computers.  There are only
degrees and kinds of portability, and you've chosen to shoot for a
different degree/kind of portability than I have.

Not that there's anything wrong with that, but I don't see your finding
a feature useless as balancing, in any sense, my finding it useful.
There are tons of things in NetBSD I find totally useless, but I
recognize that their utility to somebody is reason enough to allow them
to stick around, bloat my disk a bit though they may.  (Though as the
bloat gets larger, I start to wonder - it's not an all-or-nothing sort
of thing.)

> [T]o someone who sees us spend even an hour hacking on code from one
> variant [of UNIX] to make it work on another they are vastly
> different and thus they think they have to decide on which is best
> and hope that in the long run all the other managers make the same
> decision so that this one variant wins market dominance and wipes all
> the other variants to oblivion.

So?  I don't see what PHBs' thinking about it has to do with anything.
Diversity is good; indeed, it's necessary to avoid stagnation.

					der Mouse

		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B