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

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

bug#16567: 24.3.50; pcase should signal an error if no case matches


From: Stefan Monnier
Subject: bug#16567: 24.3.50; pcase should signal an error if no case matches
Date: Mon, 08 Sep 2014 20:41:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> What could happen if you would change it?

Obviously: errors signaled instead of returning the expected nil.
Returning nil by default is "the norm" in Elisp (think of missing `else'
branches in `if', or missing default case in `cond' or even missing
default case in `cl-case'), so it's to be expected that pcase users
would rely on this default behavior as well, even if it strikes you as
utter nonsense.

> The "nil default" would make more sense in a pcase-if or pif macro.

Changing the default of `pcase' is not an option at this point.


        Stefan





reply via email to

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