std.getopt suggestion

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Sep 30 09:37:16 PDT 2011


On 9/30/11 9:01 AM, Jonathan M Davis wrote:
> On Friday, September 30, 2011 13:07:55 Christophe wrote:
>> foobar , dans le message (digitalmars.D:145799), a écrit :
>>> Does getopt (btw, awful name)
>>
>> getopt is the name of a Posix function to read option arguments in many
>> langages. I don't think it should be changed. People trying to
>> accomplish this task will be looking for a function with that name.
>
> The _module_ is named std.getopt. People looking for it are going to find it.
> std.getopt.getopt doesn't follow Phobos' naming convention, so that would be a
> good reason to change the name to getOpt or getOptions. The fact that Posix
> has a function with the same name doesn't necessarily mean all that much,
> since Posix uses different naming conventions from Phobos, and our getopt does
> not work the same way as Posix' getopt (as I understand it, it's closer to
> perl's). Now, there is some argument for leaving it as getopt because of the
> fact that several languages use that name, but if we need to change the
> defaults for getopt (and it looks like it's probably going to be a good idea
> to do so),

ahem

Andrei


More information about the Digitalmars-d mailing list