From: Oleh Krehel <ohwoeowho@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Alan Mackenzie <acm@muc.de>, emacs-devel@gnu.org
Subject: Re: multi-assignment setq [was: setq's with missing final arguments.]
Date: Mon, 23 Nov 2015 08:58:48 +0100 [thread overview]
Message-ID: <87h9kdp2o7.fsf@gmail.com> (raw)
In-Reply-To: <b43034dc-02e5-48f7-8175-1137c1941784@default> (Drew Adams's message of "Sun, 22 Nov 2015 07:53:52 -0800 (PST)")
Drew Adams <drew.adams@oracle.com> writes:
>> but multi-variable setq is just plain bad: it makes LISP less
>> lispy that it should be. For example: "(setq bar)" is a nice
>> sexp: you can delete it, copy it, comment it, move it around
>
> That quality is not what I consider "lispiness". That same
> complaint applies to `let*' and a zillion other Lisp veterans.
By "lispiness" I mean the sexp structure that allows you to manipulate
code in a foolproof way and navigate it easier. That sexp structure also
applies to `let*', but doesn't apply for example to Clojure's `let'.
For example of being foolproof, exchanging the order of two `setq'
statements is a well defined, simple to automate operation. You can pull
it off with `transpose-sexps' if you position the point just
right. Alternatively, `kill-sexp' when positioned before the open paren
can also work for this.
On the other hand, multi-assignment setq isn't foolproof. You have to
count from sexp's start and make sure that you kill/paste starting from
the odd numbered list child and not from the even numbered. It's a
hassle that can easily be avoided. Using single-assignment setq adds
only 6 chars per assignment, compared to multi-assignment setq and:
- it reads better
- it navigates better (`forward-list' and `backward-list')
- it manipulates better
next prev parent reply other threads:[~2015-11-23 7:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-22 12:26 setq's with missing final arguments Alan Mackenzie
2015-11-22 12:31 ` David Kastrup
2015-11-22 12:35 ` Oleh Krehel
2015-11-22 12:44 ` Teemu Likonen
2015-11-22 15:53 ` multi-assignment setq [was: setq's with missing final arguments.] Drew Adams
2015-11-23 7:58 ` Oleh Krehel [this message]
2015-11-23 15:02 ` Drew Adams
2015-11-22 12:52 ` setq's with missing final arguments Andreas Schwab
2015-11-22 13:03 ` Artur Malabarba
2015-11-22 13:08 ` David Kastrup
2015-11-22 13:11 ` Andreas Schwab
2015-11-22 13:23 ` David Kastrup
2015-11-22 13:34 ` Andreas Schwab
2015-11-22 14:10 ` Alan Mackenzie
2015-11-22 15:44 ` Eli Zaretskii
2015-11-22 19:44 ` Alan Mackenzie
2015-11-23 1:36 ` Drew Adams
2015-11-22 15:42 ` Johan Bockgård
2015-11-22 16:04 ` Drew Adams
2015-11-22 15:52 ` Drew Adams
2015-11-22 23:08 ` Alan Mackenzie
2015-11-22 23:20 ` John Wiegley
2015-11-23 1:54 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h9kdp2o7.fsf@gmail.com \
--to=ohwoeowho@gmail.com \
--cc=acm@muc.de \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.