From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20306 invoked from network); 31 Jul 2021 21:06:54 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 31 Jul 2021 21:06:54 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 1CAA59C9DA; Sun, 1 Aug 2021 07:06:51 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 4745E9C9B2; Sun, 1 Aug 2021 07:06:26 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eXyV2Wvq"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 0D6EC9C9B2; Sun, 1 Aug 2021 07:06:23 +1000 (AEST) Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) by minnie.tuhs.org (Postfix) with ESMTPS id D83E89C9AF for ; Sun, 1 Aug 2021 07:06:21 +1000 (AEST) Received: by mail-oo1-f53.google.com with SMTP id k7-20020a4abd870000b029025e4d9b0a3dso3415757oop.6 for ; Sat, 31 Jul 2021 14:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kOMRgKK6zgNQr78y1wLBZiPxkPe8aEgcjP+WW4w2oUM=; b=eXyV2WvqCRSYfobBG9ujkS0Qfy4JbDIoEauAL5eE8vwjSF4BgSoqjj5xgK1eQ/SUxw 9pyqH71eWrcmMQH1skJaO3GxBWp3WKb8fW6sTO03mGocaB/+3kARSZWHTV+JiKXqXLvk cVJ84+KJJAKxVoEWuLbhV9JpwRxJfBAXcMqlyrrmZJ4w3ZGa4h9i1v/sdaTwoZYUNAYF utjh9NpbZu3QWj9RFg4Gq47gcuva3CtLKqQr6qrJmonT1/a+y/yNIXjjgvo241MFFQGT L8SPJMOIoXV1Ajk0fwMt/zdQZO/S1NBZ5+/3TE8RI3k9+F4um8cW079+HhhLJa4xvLwe iCew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kOMRgKK6zgNQr78y1wLBZiPxkPe8aEgcjP+WW4w2oUM=; b=WgbdiF+PNvVFqlCJLjOgPFiBSH2rH7BivbnEtB6GO1vkECu4WWJHFnVkxDw2oumZ9K VnfeKO4XvIUQ1X6MGnaxpax/LT6p8TTMq9eP1lrXOU4GjqG8JiENsdiElwyXDLNodYM3 WjCizQRI+/2Alz2tdNr94876pA2TsxzpWYHaDZQE9/P5N+rJUl1WSBjRyvQ0W0QTBOco QxT93WY2oZqBxum8WxXFH3XHFcw5YLBijvKWpiT0lUXkMxCrXTEWeEBp8PkEQdE54VwQ TxyT0tVBagbBgOw0u9GunlmQvKQJEokp5LvjaeGq0/E2BYIYmT3v4/cXSvL1fwCRJUwf mU8g== X-Gm-Message-State: AOAM532/jDZa3PLg30nNLk8gLHi9zKYvl/BKYmfjG0MuZj4zfizZbfqD zZz/tuhgQ4nQYVL+jQa4R42THDIYDsQdyAdmxESwWwIGpRw= X-Google-Smtp-Source: ABdhPJxK0/6yripmOjlr/zUoT6PWkb+6fr2yw3csMrfi4Kcu2tzLEf9Das7NBsffXtx9LMzsl/gWcfXvxcYvXgG434c= X-Received: by 2002:a4a:7b4b:: with SMTP id l72mr5959206ooc.9.1627765581112; Sat, 31 Jul 2021 14:06:21 -0700 (PDT) MIME-Version: 1.0 References: <20210731142533.69caf929@moon> <202107311920.16VJK2jT2362871@fourwinds.com> In-Reply-To: <202107311920.16VJK2jT2362871@fourwinds.com> From: Richard Salz Date: Sat, 31 Jul 2021 17:06:11 -0400 Message-ID: To: Jon Steinhart Content-Type: multipart/alternative; boundary="0000000000003d68f705c871b515" Subject: Re: [TUHS] Systematic approach to command-line interfaces [ meta issues ] X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --0000000000003d68f705c871b515 Content-Type: text/plain; charset="UTF-8" On Sat, Jul 31, 2021 at 3:21 PM Jon Steinhart wrote: > opinion, it doesn't add value to do something that's already been done > but differently; it detracts from value because now there's yet another > competing way to do something. > You mean like not using getopt and rolling your own? Shrug. while ((i = getopt(argc, argv, "xxxxx:xxxx")) != -1) switch (i) { case .... } argc -= optind; argv += optind; So I never got getopt(). One of my rules is that I don't use a library > in cases where the number of lines of gunk that that it takes to use a > library function is >= the number of lines to just write it myself. I don't know, what lines in the above are extra beyond what you write? The last two if being generous I suppose. --0000000000003d68f705c871b515 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Jul 31, 2021 at 3:21 PM Jon S= teinhart <jon@fourwinds.com>= wrote:
opinion,= it doesn't add value to do something that's already been done
but differently; it detracts from value because now there's yet another=
competing way to do something.

You mean= like not using getopt and rolling your own?=C2=A0 Shrug.

while ((i =3D getopt(argc, argv, "xxxxx:xxxx")) !=3D -1)<= /div>
=C2=A0=C2=A0 switch (i) {
=C2=A0=C2=A0 case ....
<= div>=C2=A0 }
argc -=3D optind;
argv +=3D optind;
<= div>
So I never got getopt().=C2=A0 One of my rules is that I don't use a li= brary
in cases where the number of lines of gunk that that it takes to use a
library function is >=3D the number of lines to just write it myself.

I don't know, what lines in the above are= extra beyond what you write?=C2=A0 The last two if being generous I suppos= e.

--0000000000003d68f705c871b515--