GNU bug report logs - #20784
25.0.50; pcase documentation on t and nil

Previous Next

Package: emacs;

Reported by: bruce.connor.am <at> gmail.com

Date: Wed, 10 Jun 2015 20:21:02 UTC

Severity: minor

Tags: fixed

Found in version 25.0.50

Fixed in version 25.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 20784 <at> debbugs.gnu.org, Artur Malabarba <bruce.connor.am <at> gmail.com>
Subject: bug#20784: 25.0.50; pcase documentation on t and nil
Date: Tue, 16 Jun 2015 12:43:55 -0400
>> We currently don't have a special "fail" pattern which simply never
>> matches.  Of course, you can make one up (e.g. (guard nil)).
> (or) would also do it, but raises (error "Please avoid it")  (BTW
> (or _) raises that error, too).  Why are those (error "Please avoid it")
> calls useful?

IIRC handling them well (i.e. generate efficient code) required more
effort than I was willing to invest, or something like that, and IIRC
they should only show up in unusual cases, so I made them signal errors,
to try and see when/where those cases show up.
So far I never bumped into them and haven't received any bug report
about them either.  We should probably remove them, tho, because those
corner cases may be annoying to avoid when doing metaprogramming.

>> That's pretty much what SELFQUOTING is.  IF you think renaming it to
>> ATOM would help, then we could do that.
> I would prefer that over SELFQUOTING

OK, changed.

> because
>   SELFQUOTING	is a shorthand for 'SELFQUOTING.
> sounds like a tautology.

As a teacher I was taught that redundancy in explanations is good ;-)

>> As explained the use of `eq' is supposed to be a pure optimization with
>> no semantics effect.

> I see.  Then I guess it would make sense to merge these two lines in the
> ` doc?

>   STRING                matches if the object is ‘equal’ to STRING.
>   ATOM                  matches if the object is ‘eq’ to ATOM.

Yes, thank you, done.


        Stefan




This bug report was last modified 8 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.