From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A2A2C1F463 for ; Fri, 13 Dec 2019 20:01:21 +0000 (UTC) Received: from localhost ([::1]:52972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifr7o-0002jC-IK for normalperson@yhbt.net; Fri, 13 Dec 2019 15:01:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56689) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifr7Z-0002j0-1f for bug-gnulib@gnu.org; Fri, 13 Dec 2019 15:01:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifr7X-00051E-FU for bug-gnulib@gnu.org; Fri, 13 Dec 2019 15:01:04 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44218) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifr7X-0004xK-8u for bug-gnulib@gnu.org; Fri, 13 Dec 2019 15:01:03 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 68DFA160549; Fri, 13 Dec 2019 12:01:01 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Vaj09CIN7oYi; Fri, 13 Dec 2019 12:00:59 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 82D2B160514; Fri, 13 Dec 2019 12:00:59 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id grRCVS-lJTZ1; Fri, 13 Dec 2019 12:00:59 -0800 (PST) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5230D1604FF; Fri, 13 Dec 2019 12:00:59 -0800 (PST) Subject: Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher To: Jim Meyering , Aharon Robbins References: <20190323080618.E6EB.27F6AC2D@kcn.ne.jp> <20190323114902.E6F6.27F6AC2D@kcn.ne.jp> <75091466-e105-c35c-fcd6-19ccca325914@cs.ucla.edu> <201912120731.xBC7V6gD031767@freefriends.org> <38194689-56ba-41f4-3810-50df1ff9019c@cs.ucla.edu> <201912130809.xBD89uUG021729@freefriends.org> <201912131208.xBDC8QLo032709@freefriends.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <20db9cb5-da09-fe26-f7fc-884fc194daaa@cs.ucla.edu> Date: Fri, 13 Dec 2019 12:00:58 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 34951@debbugs.gnu.org, Gnulib bugs , Norihiro Tanaka Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" >> I see that Paul has made the change to the API over my objections. I made the change while responding to Bruno's objections, but before seeing yours. Ooops. Sorry about that. However, I hope the followup emails have addressed your comments, at least to some extent. > Paul, can you point to a link that lists the benefits/tradeoffs? If I > had such a link handy, I would have provided it here. Avoiding unsigned types for indexes and sizes seems to be a growing movement. Admittedly there are arguments for unsigned, but these arguments are getting weaker with time. Here are a couple of links, the first for C and the second for C++: https://www.gnu.org/software/emacs/manual/html_node/elisp/C-Integer-Types.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1428r0.pdf As for ssize_t vs ptrdiff_t: ssize_t is less central to the C language (ptrdiff_t is in the C standard but ssize_t is not). And ssize_t is less convenient: for example, there's no simple, portable way to printf an ssize_t value, as there is with "%td" and ptrdiff_t. So there are technical reasons for preferring ptrdiff_t to ssize_t for this sort of thing (even though "ssize_t" is a shorter and better name). Thich is why Emacs, other parts of Gnulib, and other Gnu applications have used ptrdiff_t instead of ssize_t for this sort of thing.