standards, tools, history: options=? (-foo vs. foo=yes)

Henry Spencer henry at utzoo.UUCP
Tue Mar 27 11:47:08 AEST 1984


> Getopt, the parser referred to by several people was a first attempt at
> this, but it was never released.

Not only was getopt released with System N, as Guy Harris says, but there
is a public-domain re-implementation of it that was published in net.sources
quite some while ago.  If you want it and don't have it, either talk to
somebody who has news archives or send me mail.  (I wrote it.)  So stop
complaining that you can't get it; you can, you should, and you should
have done so quite some time ago!

(If I get enough "I'm interested" mail, I will re-post the thing.  It's
not large.)

Incidentally, another thing to scream at Berkeley about:  the public-domain
getopt was around in plenty of time to get onto 4.2BSD, but for some
reason the twits didn't include it.  I know it got to Berkeley.

So, there is *no* *excuse* for not using getopt, if your argument syntax
is anything like the normal Unix pattern.  Hereabouts, any time we work
on any existing program we fix it to use getopt.  And of course all our
new stuff uses it.  It's a huge relief to have everything accept the
same consistent syntax.  Just the uniformity is a large win.

This, incidentally, sums up my views on the proposed syntax standard.
Just the uniformity alone is a large win, well worth the trouble.  One
may argue that it is an inferior syntax, but it is *still* highly worth-
while to clean it up and make it uniform.  If for no other reason than
because a conversion to a new syntax will be a much lengthier process.

(The paper that gives details of the reasoning behind the standard is
quite interesting, by the way.  One of the things it says is that the
idea of a new and radically different, but perhaps superior, syntax was
explicitly rejected.  Why?  Because it was tried before, and nobody
paid any attention to it.  A standard that nobody follows is useless.)

I have promised, in front of a lot of witnesses, to keep the public-
domain implementation of getopt in step with whatever AT+T does in the
way of parsing software for the new standard.  The folks who did the
standard promised to keep me informed about this; nothing yet.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix.wizards mailing list