From: Stefan Monnier <monnier@iro.umontreal.ca>
To: MON KEY <monkey@sandpframing.com>
Cc: emacs-devel@gnu.org
Subject: Re: Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth
Date: Sun, 12 Sep 2010 16:00:15 +0200 [thread overview]
Message-ID: <jwv7hirxe48.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <AANLkTi=knVAJcjBeaPMZDPAChNAXXYhguT7dTwntVa9a@mail.gmail.com> (MON KEY's message of "Sat, 11 Sep 2010 19:33:07 -0400")
> Two one-liners not even a Perl devotee could love:
> (prog1 #1=(fboundp ()) (unintern #1#))
Let's see how many lines of defenses you broke in the above code:
- use of #1= in code: very bad.
- unintern takes a symbol as argument, not a boolean, so it should not
be called with the return value of (fboundp ...)
- calling unintern without an obarray arg is a bad idea.
Maybe we should make the second argument mandatory.
> Sometimes, I'm able to recover `nil' long enough to save the session,
> but even then i've not any reasonable surety that the busted `nil' is
> a correct `nil'.
The real nil is safely stored in a C variable `Qnil' which you should be
able to get via something like (not t). But I don't think Elisp lets
you re-intern it, since `intern' only takes a string rather than a symbol.
Stefan
next prev parent reply other threads:[~2010-09-12 14:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 23:33 Save `nil' from the mutant void, preserve the truth of falsehood, prevent the falsehood of truth MON KEY
2010-09-12 0:16 ` Lars Magne Ingebrigtsen
2010-09-12 11:04 ` Andy Wingo
2010-09-12 14:00 ` Stefan Monnier [this message]
2010-09-13 0:16 ` MON KEY
2010-09-13 9:52 ` Stefan Monnier
2010-09-14 5:11 ` MON KEY
2010-09-14 11:14 ` Stefan Monnier
[not found] ` <51808.130.55.118.19.1284998205.squirrel@webmail.lanl.gov>
2010-09-22 1:37 ` MON KEY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv7hirxe48.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=monkey@sandpframing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).