From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: pcase-dolist Date: Wed, 08 Jul 2015 19:32:27 +0200 Message-ID: <87y4iqh7x0.fsf@web.de> References: <87wpyaet7r.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436377589 25034 80.91.229.3 (8 Jul 2015 17:46:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2015 17:46:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 08 19:46:20 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 1ZCtJ3-0005ik-BB for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2015 19:38:50 +0200 Original-Received: from localhost ([::1]:36160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtJ2-0004To-KC for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2015 13:38:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtIz-0004Tg-AT for emacs-devel@gnu.org; Wed, 08 Jul 2015 13:38:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCtIv-0006rI-5o for emacs-devel@gnu.org; Wed, 08 Jul 2015 13:38:45 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCtIu-0006ph-W0 for emacs-devel@gnu.org; Wed, 08 Jul 2015 13:38:41 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZCtE3-0003Py-Vc for emacs-devel@gnu.org; Wed, 08 Jul 2015 19:33:39 +0200 Original-Received: from ip-2-207-84-166.web.vodafone.de ([2.207.84.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jul 2015 19:33:39 +0200 Original-Received: from michael_heerdegen by ip-2-207-84-166.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jul 2015 19:33:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-2-207-84-166.web.vodafone.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:HvL+ZiffRFFrlq5HLHAyMJ8RByA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:187778 Archived-At: Stefan Monnier writes: > It could also skip those elements that don't match That's what I had expected without thinking too much about it. But I agree that we would end with something different. > For pcase-dolist, I think the right name to use is `dolist'. Sounds good! > > Anyway, an idea that came to my mind more than once: `when-let', > > `if-let' should really be `pcase-when-let' , `pcase-if-let'. They > > would be much more useful than the plain versions I think. > > Yes, feel free to change them that way. Though, just changing them would break existing code (the current versions are about boolean values, the pcase versions would be about pattern matching). For example, now (if-let ((a (ignore))) a 17) ==> 17, but (pcase-if-let ((a (ignore))) a 17) ==> nil. Michael.