From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: member inconsistency? Date: Mon, 1 Feb 2016 13:20:11 +0100 Message-ID: References: <87twly2iye.fsf@nicolasgoaziou.fr> <871t929f1e.fsf@gmx.net> <87oac5s2a7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0160b7c6357b36052ab469e8 X-Trace: ger.gmane.org 1454329245 8178 80.91.229.3 (1 Feb 2016 12:20:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Feb 2016 12:20:45 +0000 (UTC) Cc: Emacs developers To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 01 13:20:44 2016 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 1aQDTH-0001Gh-0f for ged-emacs-devel@m.gmane.org; Mon, 01 Feb 2016 13:20:43 +0100 Original-Received: from localhost ([::1]:52027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQDTG-00058R-4c for ged-emacs-devel@m.gmane.org; Mon, 01 Feb 2016 07:20:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQDTB-00057R-F7 for emacs-devel@gnu.org; Mon, 01 Feb 2016 07:20:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQDTA-0006jR-G7 for emacs-devel@gnu.org; Mon, 01 Feb 2016 07:20:37 -0500 Original-Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:34490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQDT6-0006hq-46; Mon, 01 Feb 2016 07:20:32 -0500 Original-Received: by mail-ob0-x231.google.com with SMTP id wb13so84471083obb.1; Mon, 01 Feb 2016 04:20:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=RKpGi/PX9RF8uYpzON178gq4m4NVZnSiMfeYP78OYPg=; b=pampK6QQDE0c3Cd54TUSssG+cfxoeu6+xJ4s+Xxp21VmKL+6jekcfYZGbrXSC5ITXf PpdzwobiqHPFG9vDVux7AzFNshGcFXWUcEG42vVn7MuAzno4FF/qjES/FMlKcPMQfpKt TvYQ1SkoflepHS0AIYvMwzZSfiDg3MwbiT12F1lAChEzOD8AuL78/ewPSHynAIg2FD7K Bmq6+kicraaBJm27Vq+8NiinEsYGi5oS91joBuPqJ5BEixB/tNVGUjJe/8iMuPFvDZj+ 6tEhbkQm/xKdDBexzuSa75AEIbLdac2gQb5DG+MAu+Y1YmvZ7VJxMj9v/SdJkiXNsjyn 9U8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=RKpGi/PX9RF8uYpzON178gq4m4NVZnSiMfeYP78OYPg=; b=INUiHCGZoensVyyLknx/MOK3plaTj01Eq+gF7cuG5KXQzk24cp7GSe3s9w/QOJgcRL uKW6aNNnyo1D/S4Gnm1nwMoV//EBP5JTysGvxWCqovPPkd0fnin9kRyIswT91Dfs3Keb +yo92QE0K/3gsnld7Mmb/gHJVPeOi3CEiMhKEOV4zVS5MaLSP1/qKO6dYdqVNtEeTahd 0akPKOxUTkv9ZRsRudzk3QmnniEbGMberg/pbJUc8NUayBQX/P/+go0CFAo6bpGN0J5O VNqOOu1sYqwzQQwJXRwa23+/vocVzLCJJW0j8oAD09MId1I37yWD0xRFsinteGmH5OMe tzHg== X-Gm-Message-State: AG10YOTdYHFz2wbGNOq0kTXjyDe6YuygJ2B8BGes4nCKQu6TazTH5ZDQy2zNPvqn4uwFx/5iHCl57VHVjGtF8A== X-Received: by 10.182.73.225 with SMTP id o1mr17881802obv.80.1454329231143; Mon, 01 Feb 2016 04:20:31 -0800 (PST) Original-Received: by 10.202.78.67 with HTTP; Mon, 1 Feb 2016 04:20:11 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c01::231 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:199117 Archived-At: --089e0160b7c6357b36052ab469e8 Content-Type: text/plain; charset=UTF-8 2016-02-01 12:04 GMT+01:00 Richard Stallman : > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > It makes it harder to catch the bug if you > > inadvertently call member with its second > > argument not being a sequence ? > > There are two ways to look at this: > > * Lists should end in nil, and if they don't, functions should complain. > > * It is useful generality if functions accept lists that end > in some other atom. > > I don't see that the first is obviously preferable. > > I'm biased by CL I guess. Then you need 2 functions, one for proper lists and one for improper lists. But I would call the second one `tree-member' :-) Greetings, Fabrice --089e0160b7c6357b36052ab469e8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2016-02-01 12:04 GMT+01:00 Richard Stallman <rms@gnu.org>:
=
[[[ To any NSA and FBI agents reading my ema= il: please consider=C2=A0 =C2=A0 ]]]
[[[ whether defending the US Constitution against all enemies,=C2=A0 =C2=A0= =C2=A0]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]<= br>
=C2=A0 > It makes it harder to catch the bug if you
=C2=A0 > inadvertently call member with its second
=C2=A0 > argument not being a sequence ?

There are two ways to look at this:

* Lists should end in nil, and if they don't, functions should complain= .

* It is useful generality if functions accept lists that end
in some other atom.

I don't see that the first is obviously preferable.


I'm biased by CL I guess.
Then you need 2 functions, on= e for proper lists and one for improper lists.=C2=A0
But I would = call the second one `tree-member' :-)

Greeting= s,

Fabrice
--089e0160b7c6357b36052ab469e8--