bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Jim Meyering <jim@meyering.net>, Aharon Robbins <arnold@skeeve.com>
Cc: 34951@debbugs.gnu.org, Gnulib bugs <bug-gnulib@gnu.org>,
	Norihiro Tanaka <noritnk@kcn.ne.jp>
Subject: Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher
Date: Fri, 13 Dec 2019 12:00:58 -0800	[thread overview]
Message-ID: <20db9cb5-da09-fe26-f7fc-884fc194daaa@cs.ucla.edu> (raw)
In-Reply-To: <CA+8g5KGj39912iQGOpp1TNv4ODLq9A_Bv+KXdF3DdJuGN2W_BQ@mail.gmail.com>

>> 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.


  reply	other threads:[~2019-12-13 20:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22 23:06 [PATCH] grep: a kwset matcher not work in a grep matcher Norihiro Tanaka
2019-03-23  2:49 ` bug#34951: " Norihiro Tanaka
2019-03-23  2:58   ` Budi
2019-03-23  2:59     ` Budi
2019-03-23 12:39       ` Eric Blake
2019-03-29 10:58   ` arnold
2019-12-11 23:25   ` Paul Eggert
2019-12-12  7:23     ` arnold
2019-12-12  7:31     ` arnold
2019-12-12  7:47       ` arnold
2019-12-12 22:26       ` Paul Eggert
2019-12-13  8:09         ` arnold
2019-12-13 12:08           ` arnold
2019-12-13 17:53             ` Jim Meyering
2019-12-13 20:00               ` Paul Eggert [this message]
2019-12-14  2:35                 ` intptr_t vs. uintptr_t Bruno Haible
2019-12-14  3:19                   ` Paul Eggert
2019-12-14  9:14                     ` Bruno Haible
2019-12-14 22:29                       ` Paul Eggert
2019-12-15  0:35                         ` Bruno Haible
2019-12-16 10:02                           ` Paul Eggert
2019-12-15  8:14                 ` bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher arnold
2019-12-16  9:56                   ` Paul Eggert
2019-12-16 10:12                     ` arnold
2019-12-20  3:18                       ` Paul Eggert
2019-12-20 10:35                         ` arnold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20db9cb5-da09-fe26-f7fc-884fc194daaa@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=34951@debbugs.gnu.org \
    --cc=arnold@skeeve.com \
    --cc=bug-gnulib@gnu.org \
    --cc=jim@meyering.net \
    --cc=noritnk@kcn.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).