dmd command line options bad design: -offilename, -Ddocdir etc.

Timothee Cour thelastmammoth at gmail.com
Wed Apr 10 11:20:43 PDT 2013


Couldn't find a post on this so I'm asking here:
is there any reason why dmd chose to use this flag naming convention
in the first place?

-Dddocdir
-Dffilename
-Ipath
-offilename
(etc...)

vs a sane way, eg the one used in ldc2 (or many other unix tools,
which have a space at least as delimiter):

-Dd=docdir
-Df=filename
-I=path
-of=filename

The problem is:
* dmd's flags don't scale: now we can't have any new flag starting
with "-I" or "-L", etc as it would create conflicts. And I know some
people want to keep the number of flags to a minimum but that's not a
good reason to restrict future expansion ability
* it's visually harder to tell from the command line the options from
the arguments to these options.

If we don't deprecate in favor of the ldc2 style (is that an option
with a proper deprecation path?), can we at least make sure any future
flags will follow ldc2's convention?


More information about the Digitalmars-d mailing list