bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19670: 24.4; pcase-let bug?


From: Leo Liu
Subject: bug#19670: 24.4; pcase-let bug?
Date: Mon, 26 Jan 2015 22:27:20 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (OS X 10.10.1)

On 2015-01-24 13:07 +0800, Stefan Monnier wrote:
> Feature: the `pcase' form can have several branches (and defaults to
> nil if no branch matches), whereas the `pcase-let' form doesn't have the
> luxury of a "default case if it doesn't match", so we have to choose
> between "signal an error if it doesn't match" or "pretend it matched".
> I opted for the second choice.

I still find this inconsistent. Another similar-looking example:

(pcase 'whatever
  ((let `(,x) '(1 2 3)) (list x))) ;; => nil

It seems to make more sense for pcase-let to signal an error or bind X
to nil. WDYT?

Leo





reply via email to

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