emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on pcase


From: Przemysław Wojnowski
Subject: Re: Question on pcase
Date: Sat, 24 Oct 2015 13:37:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

W dniu 23.10.2015 o 22:39, Michael Heerdegen pisze:
Przemysław Wojnowski <address@hidden> writes:
I don't understand one thing. If "pcase" in an implementation of
Pattern Matching, then why it is called "pcase" not "pmatch"?

`pcase' itself is just one macro that pcase.el defines that makes use of
pattern matching.  I guess the name means Pattern (matching) Case,
because it's syntax and semantic is similar to `cl-case', just with
pattern matching.

IMHO it makes sense to rename it to match its concept and hence making it
easier to learn (discover) for people that know the concept from other
languages:
- Clojure: core.match (https://github.com/clojure/core.match)
- Scala: match keyword (http://docs.scala-lang.org/tutorials/tour/pattern-matching.html)
- Racket: match form (http://docs.racket-lang.org/guide/match.html)
- F#: match expression (https://msdn.microsoft.com/en-us/library/dd547125.aspx)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]