Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 Argument without name

closed
nobody
None
5
2013-05-08
2013-05-06
Dan Sirgey
No

Is it possible to have an argument without a name? I've got a quick hack I did to Arg::operation== that allows me to specify a name of "", which at first glance seems to work. Is this something that should be allowed in TCLAP?

Discussion

  • Mike Smoot
    Mike Smoot
    2013-05-07

    Well, you can have args without a flag, but not a long option name. I'd have to check to see what breaks allowing an empty name. If all of the existing tests pass with your hack, then it's something we might consider.

    Can you elaborate on why you don't want names? Maybe describe you use case?

     
  • Dan Sirgey
    Dan Sirgey
    2013-05-07

    After testing a bit more, my hack definitely doesn't entirely work.

    As for the reasoning, I'm not sure there is a great reason. The project I'm on is a library of its own, so I was trying to be as flexible as possible with my initial design. I can't think of any use case that would actually come up in practice, besides laziness of the user.

     
  • Mike Smoot
    Mike Smoot
    2013-05-08

    • status: open --> closed
     
  • Mike Smoot
    Mike Smoot
    2013-05-08

    OK. If you come up with a solid use case and a patch that passes all of the existing tests, then feel free to reopen. Thanks!