From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#40972: 27.0.91; assoc TESTFN's args reversed? Date: Wed, 9 Sep 2020 06:22:18 -0700 Message-ID: References: <47D61E6B43780AC31D0B86@gmail.com> <87sgglvpiy.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6383"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 40972@debbugs.gnu.org, Shigeru Fukaya To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 09 15:23:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kG049-0001Xg-S0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Sep 2020 15:23:13 +0200 Original-Received: from localhost ([::1]:45766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kG048-0001Id-Sb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Sep 2020 09:23:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kG03z-0001G1-GE for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 09:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kG03z-0004Ry-5t for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 09:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kG03z-0001DI-2k for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2020 09:23:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Sep 2020 13:23:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40972 X-GNU-PR-Package: emacs Original-Received: via spool by 40972-submit@debbugs.gnu.org id=B40972.15996577464578 (code B ref 40972); Wed, 09 Sep 2020 13:23:03 +0000 Original-Received: (at 40972) by debbugs.gnu.org; 9 Sep 2020 13:22:26 +0000 Original-Received: from localhost ([127.0.0.1]:57881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG03O-0001Bh-Hl for submit@debbugs.gnu.org; Wed, 09 Sep 2020 09:22:26 -0400 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]:35789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG03M-0001BE-HI for 40972@debbugs.gnu.org; Wed, 09 Sep 2020 09:22:24 -0400 Original-Received: by mail-ed1-f42.google.com with SMTP id i1so2644904edv.2 for <40972@debbugs.gnu.org>; Wed, 09 Sep 2020 06:22:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=nkhYfZ90Y0ci10P8T/EMnVxQi1+7Nc0r1V8xifkB7iA=; b=nVn1ubgmSE+6RB9nzuRyCpYNHXgJql1ZM1vWPs5MGW3ERx6J3GxlcMu/mCk41WqHPB mrCCuNFbeQvLqomtylrOj1R/3QAhZ8vrVQdvoxsUgigdbqsLHWI4bHQ9TTvz0VVE4r+A OnBoTz2RmOwhEjF5PKtrAefQLiBNwODEupteFSED5R8d1W1hSuFXPya+QMRH8e13df1q iVIIX9uDSRyYwGaWJFfCCcd4AMMkt64kHdFD+j1eqwBjzzWv850iNh6rZ7tS0++vAAX8 TIhjXGq0pXiaJktHIOav4sHF44xMAmng+AZOrEFd/Qi39YVYKDGYnznwEhXyhXm/7dcd MF3A== X-Gm-Message-State: AOAM531SNHH5yK+VGRRK42uH1Y3oavD0rfjYaiQFQKAukiRIAHqAEoTP m3dhuXe3McK5RWwK1Q+pBn9UkKFUyYEhMgGdFvs= X-Google-Smtp-Source: ABdhPJyos2INj7d+ygTrmNG0W6YkSvFltxQSRqqVK7wDgVVr0AsXbDf5GG6qEH1nZ3WIfPt+5h/5gsq+WlttrYrZ93I= X-Received: by 2002:a05:6402:1d03:: with SMTP id dg3mr3884156edb.249.1599657738779; Wed, 09 Sep 2020 06:22:18 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 9 Sep 2020 06:22:18 -0700 In-Reply-To: <87sgglvpiy.fsf@web.de> (Michael Heerdegen's message of "Thu, 30 Apr 2020 01:30:13 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187650 Archived-At: tags 40972 + wontfix notabug close 40972 thanks Michael Heerdegen writes: > Shigeru Fukaya writes: > >> It seems to me, for third argument of `assoc', arguments are passed in a >> reverse order. >> >> (assoc "assoc" '(("cl-assoc" A) ("cl-member" B)) >> (lambda (x y) (equal (concat "cl-" x) y))) >> ==> nil >> >> (assoc "assoc" '(("cl-assoc" A) ("cl-member" B)) >> (lambda (y x) (equal (concat "cl-" x) y))) >> ==> ("cl-assoc" A) >> >> Or, is this intended behavior?? > > Dunno what others expect, but note that your predicate is not an > equality predicate (it's not symmetric), and the docstring doesn't > specify a behavior for this case. As Michael points out, the equality operation is symmetric and therefore by definition the order does not matter. We therefore cannot say if X=Y or Y=X is "more correct": they are equivalent. In any case, I think it will cause more problems to switch the argument order at this point, since there might be code out there that relies on this (undocumented) behavior. So I'm closing this bug.