[haiku-commits] Re: r34140 - haiku/trunk/src/apps/screenshot

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 20 Nov 2009 12:51:32 -0500

On Fri, Nov 20, 2009 at 5:51 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
>
> Indeed, you should always use getopt()/getopt_long() for options.

I have thought for some time that having some sort of OptionParse
class which wraps the above nicely might be a handy thing in the Haiku
code. At least as part of the private shared code. Because it seems
like we have a lot of manual option parsing and things aren't
consistent. That always bothered me about some of the BeOS
command-line tools too.

You can complain a lot about the GNU stuff but they at least got that
right. Though using getopt() and getopt_long() is a bit ugly, hence
why I would like a class (at least for C++ code.)

So if anyone is inclined please take a stab at this. Otherwise I'll
work on it at some indeterminate time in the future (maybe if I add
command-line options to the browser.)

-- 
Regards,
Ryan

Other related posts: