emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase ` meaning


From: Clément Pit-Claudel
Subject: Re: pcase ` meaning
Date: Thu, 1 Nov 2018 09:22:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 31/10/2018 19.13, Garreau, Alexandre wrote:
> In lisp I would have prefered to be able to directly quote each symbol,
> and have this to work, eg: “(pcase (list 1 2 3) (('a 'b 'c) t))” to
> return nil, and “(pcase (list 'a 'b 'c) (('a 'b 'c) t))” to return t
> (and this is like many other lisp pattern-matching implementations
> already work).  In current pcase, pattern “(a b c)” does *not* mean
> “with symbols 'a, 'b and 'c”.

But remember that this breaks the pattern-body symmetry:  
  (pcase (list 'a 'b 'c) (('a 'b 'c) ('a 'b 'c)))
would match, but the body would raise an error.



reply via email to

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