[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19670: 24.4; pcase-let bug?
From: |
Stefan Monnier |
Subject: |
bug#19670: 24.4; pcase-let bug? |
Date: |
Mon, 26 Jan 2015 17:59:09 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> It seems to make more sense for pcase-let to signal an error or bind X
> to nil. WDYT?
Signaling an error would be fine. But it significantly increases the
macro-expanded code size (i.e. it's a lot less efficient).
Defaulting to binding all vars to nil in case of match failure seems
like an even more surprising behavior than what we have now.
The current pcase-let (and pcase-dolist) is meant as a "destructuring"
operation: it doesn't *check* anything, it just accesses subelements of
a structure.
Stefan