From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel,gmane.emacs.help Subject: Re: no empty (zero) string predicate in Elisp Date: Sat, 16 May 2015 16:36:18 +0300 Message-ID: References: <87h9s4rhx5.fsf@debian.uxu> <87wq107e40.fsf@petton.fr> <87a8x4ub83.fsf@blueberry.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11349500ae93030516330b12 X-Trace: ger.gmane.org 1431783390 14390 80.91.229.3 (16 May 2015 13:36:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 May 2015 13:36:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Emanuel Berg , emacs-devel To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 16 15:36:29 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YtcGS-0001vd-Hm for ged-emacs-devel@m.gmane.org; Sat, 16 May 2015 15:36:28 +0200 Original-Received: from localhost ([::1]:34665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtcGR-00086t-Kf for ged-emacs-devel@m.gmane.org; Sat, 16 May 2015 09:36:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtcGN-0007sS-Nr for emacs-devel@gnu.org; Sat, 16 May 2015 09:36:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtcGM-0004fc-Ih for emacs-devel@gnu.org; Sat, 16 May 2015 09:36:23 -0400 Original-Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:35412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtcGJ-0004f2-FR; Sat, 16 May 2015 09:36:20 -0400 Original-Received: by labbd9 with SMTP id bd9so160583142lab.2; Sat, 16 May 2015 06:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=REYPAtWeb0id2j7V1ZbXueflE/eOO7ew1cp4FBbx1OA=; b=um3S+SMLyCMLXmJPrg0ZOlybKEWOJlv+dPUms5c/vOSnzxU71FbHtvZsOjzCNIcu7w 0jz1p4Avbc7/G1w9qzWtA8Lzs0kqKXCEDSDBvH+EWBSgN4pNj7F4XtHl4s8T55gq/rdI PjrMsPetGpEvbxAtrhU5KeYjxEQwySXnH/sf6QLcfhMF3US31H9OSbKdrU82YM+Js0o5 CXxkEoG/su2hOvToORU0eEgqPRIM7A4H1P1M/exh6QyvFC8VCr4S/JxfqdUUw2mtW/DK VxMI70q+/V3g7mkXzJxdL5wCEVy+FpTUETjuJkMT0RlZFj26GxVt8bKFUSKeMKLqoNhg Ytyw== X-Received: by 10.152.179.233 with SMTP id dj9mr10890421lac.101.1431783378684; Sat, 16 May 2015 06:36:18 -0700 (PDT) Original-Received: by 10.112.25.7 with HTTP; Sat, 16 May 2015 06:36:18 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: uvwsu4jPr6Kp9qy9mOlZKJfRMEM X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186535 gmane.emacs.help:104467 Archived-At: --001a11349500ae93030516330b12 Content-Type: text/plain; charset=UTF-8 And one more thing - `string-empty-p` uses string comparison (`string=`) instead of length comparison. On 16 May 2015 at 16:28, Bozhidar Batsov wrote: > Btw, `string-reverse` was already obsoleted by `reverse`. > > On 16 May 2015 at 16:22, Bozhidar Batsov wrote: > >> I'd advise against this, as my intuition would always be to search for >> something starting with `string-` when dealing with strings. >> >> On 16 May 2015 at 12:23, Nicolas Petton wrote: >> >>> >>> Nicolas Petton writes: >>> >>> > You can use `string-empty-p' from subr-x.el or `seq-empty-p' from >>> > seq.el (which works on all sequence data types). >>> > >>> > seq.el will be included in Emacs 25.1, but in the meantime you can >>> > install it from GNU Elpa. >>> >>> BTW, would it be wise to obsolete `string-reverse' and `string-empty-p' >>> From subr-x in favor of `seq-reverse' and `seq-empty-p' which are much >>> more generic? >>> >>> Nico >>> -- >>> Nicolas Petton >>> http://nicolas-petton.fr >>> >> >> > --001a11349500ae93030516330b12 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
And one more thing - `string-empty-p` uses string comparis= on (`string=3D`) instead of length comparison.=C2=A0

On 16 May 2015 at 16:28, Bozhidar = Batsov <bozhidar@batsov.com> wrote:
Btw, `string-reverse` was already obsoleted = by `reverse`.=C2=A0

On 16 May 2015 at 16:22, Bo= zhidar Batsov <bozhidar@batsov.com> wrote:
I'd advise against this, as my intu= ition would always be to search for something starting with `string-` when = dealing with strings.=C2=A0

<= div class=3D"gmail_quote">On 16 May 2015 at 12:23, Nicolas Petton <nicolas= @petton.fr> wrote:

Nicolas Petton writes:

> You can use `string-empty-p' from subr-x.el or `seq-empty-p' f= rom
> seq.el (which works on all sequence data types).
>
> seq.el will be included in Emacs 25.1, but in the meantime you can
> install it from GNU Elpa.

BTW, would it be wise to obsolete `string-reverse' and `string-empty-p&= #39;
>From subr-x in favor of `seq-reverse' and `seq-empty-p' which are m= uch
more generic?

Nico
--
Nicolas Petton
http://nicolas-petto= n.fr



--001a11349500ae93030516330b12--