[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Usefulness of (t nil) as the last sexp in (cond ...) constructs?
From: |
Achim Gratz |
Subject: |
Re: Usefulness of (t nil) as the last sexp in (cond ...) constructs? |
Date: |
Sun, 19 Aug 2012 13:29:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Bastien writes:
> There are many places in *.el elisp files where we have this construct
>
> (cond (...)
> (...)
> (t nil))
>
> My understanding is that (t nil) is useless, since the ̀t' condition
> is only tested if other conditions are `nil'.
>
> What is the purpose of (t nil)?
It's a nice (redundant) reminder that "if none of the other conditions
is true, this form returns nil".
> Can we safely remove it?
I don't know if any checkers rely on it. I'd expect it is optimized
away when the byte-compiler gets to it anyway, so why would you want to
remove it?
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves