[Issue 2993] getops uses globals for formatting

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Nov 3 12:24:16 PST 2015


https://issues.dlang.org/show_bug.cgi?id=2993

--- Comment #5 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to hsteoh from comment #4)
> Vague?
> 
> I thought it's pretty clear what this bug is asking for: fix the
> implementation of getopt so that it doesn't require the use of globals.  (Of
> course, whether or not this is worth the effort is a different story. I have
> a hard time imagining a case where this would be an actual problem in
> practice.)

There's only one command line in a program and usually only one place it gets
implemented. So globals don't strike me as a mistake here. Also, there's the
matter of backward compatibility.

If there's a PR with an improvement, it's great to review it. But I don't think
we need to keep a bug report open on it just because "globals are bad design".

--


More information about the Digitalmars-d-bugs mailing list