[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: if vs. when vs. and: style question
From: |
Thien-Thi Nguyen |
Subject: |
Re: if vs. when vs. and: style question |
Date: |
Tue, 24 Mar 2015 08:21:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
() Marcin Borkowski <mbork@wmi.amu.edu.pl>
() Mon, 23 Mar 2015 23:53:02 +0100
Notice: by “better” I mean “more idiomatic”, or
“easier/faster to read for a human”, or “more likely
to be used by an experienced Elisp hacker”, etc.
Personally, i loathe 1-armed-‘if’ expressions; they are a blight
on the smoothness, equivalent to "umm", "err" in a formal talk.
When i inherit code (e.g., EDB), i early-on put effort into
killing those abominations. (This has the predictable side
effect of introducing bugs, but is anyway useful for
familiarizing myself w/ the code, which in the long run is
better -- especially if those bugs can be recognized and fixed!)
For ‘or’ and ‘and’, i use those very much in Scheme and very
little in Emacs Lisp, and preferentially for pure expressions.
I like (and use) ‘when’ and ‘unless’ for their implicit ‘progn’.
(Insert quote on aesthetics vs principles, here. :-D)
--
Thien-Thi Nguyen -----------------------------------------------
(if you're human and you know it) read my lisp:
(defun responsep (type via)
(case type
(technical (eq 'mailing-list via))
...))
---------------------------------------------- GPG key: 4C807502
signature.asc
Description: PGP signature
- Re: if vs. when vs. and: style question, (continued)
- Re: if vs. when vs. and: style question, Rusi, 2015/03/27
- Re: if vs. when vs. and: style question, Rusi, 2015/03/24
- Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/26
- Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/27
- Re: if vs. when vs. and: style question, Pascal J. Bourguignon, 2015/03/27
- Re: if vs. when vs. and: style question, Rusi, 2015/03/27
- Re: if vs. when vs. and: style question, Pascal J. Bourguignon, 2015/03/28
- Re: if vs. when vs. and: style question, Pascal J. Bourguignon, 2015/03/24
- Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/24
Re: if vs. when vs. and: style question,
Thien-Thi Nguyen <=
Message not available
Re: if vs. when vs. and: style question, Emanuel Berg, 2015/03/23