[Gambas-user] New component: gb.args

Bruce bbruen at ...2308...
Fri Oct 19 14:19:25 CEST 2012


On Fri, 2012-10-19 at 12:57 +0200, Benoît Minisini wrote:
> Le 19/10/2012 12:55, Bruce a écrit :
> > One other!
> >
> > For the future.  Could you consider the use of -/+ options (and --/++).
> > The only example I can think of at the moment is vi, as in
> >          vi +3 .project
> > which starts vi and positions the cursor at line 3.
> >
> > regards
> > Bruce
> >
> 
> This is not standard... The standard (AFAIK) tells that options begin 
> with "-" and "--".
> 
:-) Standard? What standard? ;-)

A quick search revealed this beauty from one Mr E.S. Raymond in "The Art
of Unix Programming" www.faqs.org/docs/artu/ch10s05.html

"The original Unix style evolved on slow ASR-33 teletypes that made
terseness a virtue; thus the single-letter options. Holding down the
shift key required actual effort; thus the preference for lower case,
and the use of “-” (rather than the perhaps more logical “+”) to enable
options.

Meanwhile, back at GNU
www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html
"It is a good idea to follow the POSIX guidelines for the command-line
options of a program. The easiest way to do this is to use getopt to
parse them. Note that the GNU version of getopt will normally permit
options anywhere among the arguments unless the special argument ‘--’ is
used. This is not what POSIX specifies; it is a GNU extension."

!!! googling "POSIX" !!! at this point is not really recommended.  At
best it causes confusion and indigestion, at worst you may end up with a
list of pages that seem to imply that java is the definition of POSIX
(which to me is somewhat like saying that Fortran IV is a good
definition of object oriented programming).

At which point we retreat to wikipedia, only to be confronted with
GNU/linux being included in the list of "Mostly POSIX compliant"
operating systems!
http://en.wikipedia.org/wiki/POSIX

Why does the phrase "mostly harmless" keep popping into my brain here.

Perservering, and please contain your hilarity here, to the "Linux
Standards Base", we find that the  "The LSB is based on the POSIX
specification, the Single UNIX Specification, and several other open
standards, but extends them in certain areas."
http://en.wikipedia.org/wiki/Linux_Standard_Base

But wait! There's more! At revision 4.1 (2011-02-16) "Java removed"

.. there may be some common sense here somewhere yet!

No. Too optimistic. Next paragraph...

"The LSB is designed to be binary-compatible and produce a stable
application binary interface (ABI) for independent software vendors. To
achieve backward compatibility, each subsequent version is purely
additive. In other words, interfaces are only added, not removed. The
LSB adopted an interface deprecation policy to give application
developers enough time in case an interface is removed from the LSB.
This allows the developer to rely on every interface in the LSB for a
known time and also to plan for changes, without being surprised.
Interfaces are only removed after having been marked "deprecated" for at
least three major versions, or roughly six years."


Getting back to the ASR-33 teletype.

Here's a picture of one.
http://www.csse.monash.edu.au/museum/Teletype_ASR33.jpg

I've just had a look around the room here and can't seem to find one....

maybe they have been "deprecated"?  ... somewhere in the last "roughly
six years"? or so?

Standard? What standard?

:-) :-) :-)

best regards
Bruce










More information about the User mailing list