Re: [dev] stest review

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Sat, 11 Feb 2012 16:25:31 +0100

On 11 February 2012 16:02, Kurt H Maier <khm-suckless_AT_intma.in> wrote:
> On Sat, Feb 11, 2012 at 03:39:35PM +0100, Anselm R Garbe wrote:
>> It's quite consistent in most suckless tools actually. One difference
>> I stumbled upon is exactly stest, because it uses the clunky getopt()
>> approach and I really wonder why it needs so many flags.
>
> sbase uses getopt and I suspect will continue to do so.  it's all very
> well to go on about 'too much choice' but it's hard enough to get people
> to implement fundamental unix utilities without also demanding they jump
> through option parsing hoops for no technical reason.
>
> if you like for() stuff so much, why not put it into a function and
> stuff that into a library?  maybe call it getopt?

Writing a for() loop to process the arguments is the same effort as
using the ARG... approach or using getopt().
Hence, there is absolutely no point in writing a function or macro
that does it, as arguments will vary from tool to tool.

Cheers,
Anselm
Received on Sat Feb 11 2012 - 16:25:31 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 11 2012 - 16:36:05 CET