Fixing valid options for std.getopt

Jens Mueller jens.k.mueller at gmx.de
Wed Aug 10 00:41:33 PDT 2011


David Nadlinger wrote:
> On 8/10/11 2:57 AM, Jonathan M Davis wrote:
> >It's _very_ odd for dmd to have flags which are multi-character but only take
> >a single -, and I'd argue that that's not behavior which should be emulated.
> 
> I don't know what your definition of odd is, but some
> counterexamples that immediately come to my mind: GCC, just about
> every Java VM, LLVM/Clang, …

I've also come across this. I first thought it's a GNU vs. something
other issue. But gcc proves me wrong.
The basic difference is whether a long option has to have two dashes. If
it doesn't, then bundling of short options cannot be supported as Mike
Wey pointed out some time ago. I often use this bundling when using tar,
e.g. tar -xf <file>.
Maybe the above tools need no bundling.

Jens


More information about the Digitalmars-d mailing list