Recommendation on option parsing

Robert Schadek via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 13 04:35:51 PDT 2014


On 05/13/2014 05:40 AM, Chris Piker via Digitalmars-d-learn wrote:
> On Monday, 12 May 2014 at 23:11:57 UTC, Robert Schadek via
> Digitalmars-d-learn wrote:
>
> Okay, I replaced the std.getopt that came with dmd with your
> version.  My code compiles, but of course it doesn't link
> against the old libphobos.so.  I'm a complete newbe to D and
> am not ready to build a new version of libphobos.so, that's
> for the library maintainers to do, which is not a job I'm ready
> to sign up for yet.  Right now I'm just trying to get my own
> project done, and so far D's standard library is being a HUGE
> impediment.  It's like programming against bare glibc all over
> again when I hoped it would be a little more like the Python
> standard libary.
>
> Just being a random developer my opinon isn't that important
> but, for what it's worth, I think an expanded option handling
> feature should be implemented in a separate module.  That way
> users can try it out without affecting their existing libphobos.
>
> I like your enthusiasm.  If you have any modules that don't
> require me to rebuild libphobos, I'll be happy to give them a
> whirl.  Thank's for responding to my inquiry.
>
> -- 
> Chris
Well, it is a pull request for std.getopt, therefore it can't stand
alone. That been said, get into getopt.d and copy anything below line
1061 ( the begin of the comment for GetoptExRslt) into a new file. Add
all imports from getopt.d + std.getopt and then add the new file to
you're build. This allows you to use getoptEx without modifying your
systems default libphobos.


More information about the Digitalmars-d-learn mailing list