From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: philippe schnoebelen Newsgroups: gmane.emacs.devel Subject: Re: regular expressions that match nothing Date: Mon, 20 May 2019 09:56:47 +0200 Message-ID: References: <7a6b23f52418b093a4cf7a6db4306cf425533249.camel@acm.org> <87ftpefevf.fsf@ericabrahamsen.net> <0E7D1DF3-682F-4FB9-8378-FEA3E9FDE5E9@acm.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a195d705894d132e" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="121525"; mail-complaints-to="usenet@blaine.gmane.org" Cc: HaiJun Zhang , Emacs developers To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 20 09:57:50 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSdB7-000VUE-RT for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 09:57:49 +0200 Original-Received: from localhost ([127.0.0.1]:59702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSdB6-00032B-I7 for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 03:57:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSdAP-0002zx-S2 for emacs-devel@gnu.org; Mon, 20 May 2019 03:57:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSdAM-0007Y9-2Z for emacs-devel@gnu.org; Mon, 20 May 2019 03:57:03 -0400 Original-Received: from mail-ua1-x92c.google.com ([2607:f8b0:4864:20::92c]:45544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSdAK-0007Vp-4A for emacs-devel@gnu.org; Mon, 20 May 2019 03:57:01 -0400 Original-Received: by mail-ua1-x92c.google.com with SMTP id n7so4912423uap.12 for ; Mon, 20 May 2019 00:56:58 -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=NBEBqdgTTIzGtWh+rQZiQH19SJKSK/MS5gnVhSVhBlw=; b=tOhbEvUdCHCYvntpkRJiEQGQOYHy+ymXo1IqrC4CjPkg3S0qA359HDs7rWOdyotJ9M fKvPtDjkhGIJr3ORew4PFckOPqLv17SjRaiKbIqD9MWAz2Vw+9pg56QYLs3N/3fpnglf Crbo2ySvVs/wmjmhGTUbL3+p93HuPXmw9DU9sB63L7oIy5bKieFmgwG8cXvqgAvjNEi4 7pzVsCbaqhYgDqvGsvmKW8pbMH+8y2sRNtmrqYpsLlX5VXWZWnjzmR+n4h3ItwLZFlhm J5/guGQz/Ss+exG1z3pRMnuJga5QxfxfYihvWsdUOmjdjeCQ1+lpWBJXvjA0mAUUbGdF g9vw== 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=NBEBqdgTTIzGtWh+rQZiQH19SJKSK/MS5gnVhSVhBlw=; b=SmTXS+y2HE5pkSrbVMmzRpANv38kknp48O/KxCziJq70g8+GVg4r/+mNzXmYNi13QA ZTwu+DgQB8aYjDNvk5GcOA91Qj6FENFasas9yhg3qNVTNbWfjZusKKTKdFkK+gM/xcqI +OizRQw8S05in9c+tJkc0D7/QWI3DZTHF4Q9qRJlUG3R2mbU4l06Kj1TQnuqFjlk7ON9 EZcCU3Sr4ZbgM4ZD7dtWTVZEtL4pZai4nf2YH7oRW8skq0ljhAvXkDk6XxlUGk2gLoW1 dsfijfSnN7nzCg4dSTHVoFL59LOiIcHvEOFx3BF8h5CO+ri2goXL5WS2YqKz29XACQlq M0kQ== X-Gm-Message-State: APjAAAWc7EuwMCHgI0SRWJh51xsDq/40yadRB7LLKiySP1T29wLCu+6H lLjGDClJ837qyECmMPTKh4oMkq+Ivtcio3JpTQo= X-Google-Smtp-Source: APXvYqzCqpub74OpY7d8VmPCY3QPCPwVIukpgQSpzH1nhjWSE5ruBVvrntQExpjf63aK/8T77BaqX/6f+JOA6KdimCA= X-Received: by 2002:a9f:3622:: with SMTP id r31mr6549338uad.24.1558339018395; Mon, 20 May 2019 00:56:58 -0700 (PDT) In-Reply-To: <0E7D1DF3-682F-4FB9-8378-FEA3E9FDE5E9@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::92c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236776 Archived-At: --000000000000a195d705894d132e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The (real) risk of misunderstanding exists with all options that include "null", "empty", "void", "nothing", "nada". The name refers to a set of matches but can be understood as qualifying the match itself, as a set of chars. If you teach programming and mark code written by students, you know that the confusion will definitely happen. This is why I much prefer Alan's re-nomatch suggestion. On Sun, 19 May 2019 at 09:33, Mattias Engdeg=C3=A5rd wro= te: > 19 maj 2019 kl. 07.00 skrev HaiJun Zhang : > > > > > regexp-null? It's also a little cryptic, but it's short! > > > > What about regexp-nothing or re-nothing? > > Those are fair suggestions and close to the mathematical meaning, but > could possibly be misunderstood as patterns (only) matching the empty > string. > > > --000000000000a195d705894d132e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The (real) risk of misunderstanding exists with all o= ptions that include "null", "empty", "void", = "nothing", "nada". The name refers to a set of matches = but can be understood as qualifying the match itself, as a set of chars. If= you teach programming and mark code written by students, you know that the= confusion will definitely happen.

This is why= I much prefer Alan's re-nomatch suggestion.

On Sun, 19 May 20= 19 at 09:33, Mattias Engdeg=C3=A5rd <mattiase@acm.org> wrote:
19 maj 2019 kl. 07.00 skrev HaiJun Zhang <netjune@outlook.com>: >
> > regexp-null? It's also a little cryptic, but it's short!<= br> >
> What about regexp-nothing or re-nothing?

Those are fair suggestions and close to the mathematical meaning, but could= possibly be misunderstood as patterns (only) matching the empty string.

--000000000000a195d705894d132e--