new DIP41: dmd/rdmd command line overhaul.

Jonathan M Davis jmdavisProg at gmx.com
Wed May 22 11:14:33 PDT 2013


On Tuesday, May 21, 2013 20:49:16 Jacob Carlborg wrote:
> On 2013-05-21 20:29, Walter Bright wrote:
> > If it is consistent, I have failed to figure out what the rule is. Each
> > thing I want to do I have to write out on a crib sheet.
> 
> Git:
> 
> * Flags with a single letter always start with a single dash
> * Flags with multiple letters always start with two dashes
> * If a flag contains multiple words they're concatenated with a dash
> * I can run --help after each command to get help info
> * Each flag has a full name and many have a single letter version as well

This is how every command line tool should do it, and it's semi-standard, but 
unfortunately not all programs follow it (compilers in particular seem to do a 
bad job of it). On a related note, one of my pet peeves is the fact that 
std.getopt doesn't do bundling by default, as that's another thing that's 
semi-standard. Most *nix apps actually get this right (particularly if they're 
not ancient - the only ones seem more likely to have screwy rules about the 
order of flags and how many dashes you use and whatnot), but dmd doesn't follow 
the proper flag rules at all (probably because it's primary maintainer is 
primarily a Windows guy).

- Jonathan M Davis


More information about the Digitalmars-d mailing list