From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: pcase-dolist Date: Wed, 08 Jul 2015 17:27:47 -0400 Message-ID: References: <87wpyaet7r.fsf@web.de> <87y4iqh7x0.fsf@web.de> <87oajmld49.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436390900 14650 80.91.229.3 (8 Jul 2015 21:28:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2015 21:28:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 08 23:28:10 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 1ZCwsz-0005ms-QW for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2015 23:28:09 +0200 Original-Received: from localhost ([::1]:36950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCwsz-0006EK-6g for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2015 17:28:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCwsv-0006EE-4g for emacs-devel@gnu.org; Wed, 08 Jul 2015 17:28:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCwsq-000607-Uo for emacs-devel@gnu.org; Wed, 08 Jul 2015 17:28:05 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCwsq-0005za-Qy for emacs-devel@gnu.org; Wed, 08 Jul 2015 17:28:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxFgA731xV/2cGNJ1cgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBBgIBH4s6hQUHhC0FtQQjgWaCLiKCeAEBAQ X-IPAS-Result: A0AxFgA731xV/2cGNJ1cgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBBgIBH4s6hQUHhC0FtQQjgWaCLiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="129561014" Original-Received: from 157-52-6-103.cpe.teksavvy.com (HELO pastel.home) ([157.52.6.103]) by ironport2-out.teksavvy.com with ESMTP; 08 Jul 2015 17:27:57 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9B2A36122D; Wed, 8 Jul 2015 17:27:47 -0400 (EDT) In-Reply-To: <87oajmld49.fsf@gnu.org> (Tassilo Horn's message of "Wed, 08 Jul 2015 20:26:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:187783 Archived-At: > (pcase-let ((`(,w ,x ,y ,z) '(1 2 3))) > (message "%s %s %s %s" w x y z)) > prints "1 2 3 nil" although the pattern when used in `pcase' wouldn't > match that list but only 4-element lists. So a pcase pattern has > different semantics depending on whether it is used in `pcase' or > `pcase-let' or `pcase-dolist' which doesn't feel right. > I'd prefer if `pcase-let' would signal an error if some pattern doesn't > match. So you'd want the above to signal an error in the case of: (pcase-let ((`(,w ,x) '(1 2 3))) (message "%s %s" w x)) ? Stefan