From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: pcase.el Date: Mon, 27 Sep 2010 17:59:28 +0100 Message-ID: References: <87vd5x7ty2.fsf@stupidchicken.com> <87vd5wo48a.fsf@stupidchicken.com> <8739t03q2g.fsf@stupidchicken.com> <87k4mb2mfu.fsf@stupidchicken.com> <87pqw3nm4y.fsf@stupidchicken.com> <87k4m9esog.fsf@gmail.com> <874odd413d.fsf_-_@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285606781 27565 80.91.229.12 (27 Sep 2010 16:59:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Sep 2010 16:59:41 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 27 18:59:40 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P0H3D-0006jI-K8 for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 18:59:39 +0200 Original-Received: from localhost ([127.0.0.1]:52567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0H3D-0003sC-77 for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 12:59:39 -0400 Original-Received: from [140.186.70.92] (port=44457 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0H38-0003rP-BB for emacs-devel@gnu.org; Mon, 27 Sep 2010 12:59:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0H37-0007L7-5h for emacs-devel@gnu.org; Mon, 27 Sep 2010 12:59:34 -0400 Original-Received: from ppsw-33.csi.cam.ac.uk ([131.111.8.133]:53720) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0H37-0007Ko-1s for emacs-devel@gnu.org; Mon, 27 Sep 2010 12:59:33 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com ([86.9.122.85]:53623 helo=Victoria.local) by ppsw-33.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:587) with esmtpsa (PLAIN:sl392) (TLSv1:DHE-RSA-AES128-SHA:128) id 1P0H34-0006aL-h5 (Exim 4.72) (return-path ); Mon, 27 Sep 2010 17:59:30 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 27 Sep 2010 00:06:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (Mac OS X 10.6.4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131010 Archived-At: On 2010-09-26 23:06 +0100, Stefan Monnier wrote: >>>> Yes, pattern matching in Elisp would be a very cool addition. > SM> The future has passed. It's called `pcase'. > >> That seems really useful (lately I've been working with CLIPS, which is >> a sort of idiot cousin to ML). Are there docs or examples for pcase.el? >> I don't see any usage in the Emacs lisp/ tree. > > The docstring of `pcase' is meant to be "complete", so you can start > with that and complain about the missing bits. Don't bother complaining > if you're not famailiar with ML-style pattern matching, tho (the > docstring is written under the assumption that this much is known). > > There's a fairly good/extensive example in macroexp.el. > > > Stefan There's also an erlang-style matcher for elisp here: http://code.google.com/p/distel/. Leo