unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Boruch Baum <boruch_baum@gmx.com>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: RE: adding to emacs coding standard / formatting
Date: Mon, 19 Oct 2020 13:07:15 -0700 (PDT)	[thread overview]
Message-ID: <2d7ec6c1-3eb8-403d-8b8e-f23d4a058033@default> (raw)
In-Reply-To: <20201019195935.5m6owfzy4iuvbz2e@E15-2016.optimum.net>

> > > Also, this is an opportunity to address a pet peeve: I occasionally see
> > > code either defining keybindings to lambda functions, or setting lambda
> > > functions as elements of function lists (eg. lists of hook functions).
> > > I'd like to propose that those uses be banned because of their
> > > difficulty to modify.
> >
> > Where would you allow lambda functions, then?
> 
> I see them most used as arguments/predicates to mapping functions or as
> common-lisp predicates (eg. :test).
> 
> My complaint is against their use in situations that make standard
> manipulation practices difficult: 1) When you assign a keybinding to a
> lambda function, you can't remap to it; 2) When you add a lambda
> function to a list, you lose the ability to perform operations such as
> memq, delq, and you can't modify the element in place.

Why would this be part of the code conventions?

Yes, users should be given this guidance, to save
themselves trouble (e.g. for advice and hooks).
And they should be told the reasons (i.e., told
about the potential bother).  I agree with that
whole-heartedly.

But what does this have to do with coding
conventions?  (Let alone why would such usage be
"banned".)

This is on the order of helpful tips, not coding
conventions, IMO.



  reply	other threads:[~2020-10-19 20:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19  3:10 adding to emacs coding standard / formatting Boruch Baum
2020-10-19  9:28 ` Stefan Kangas
2020-10-19 15:37   ` Drew Adams
2020-10-19 14:24 ` Stefan Monnier
2020-10-19 14:32 ` Eli Zaretskii
2020-10-19 19:59   ` Boruch Baum
2020-10-19 20:07     ` Drew Adams [this message]
2020-10-21  4:37       ` Richard Stallman
2020-10-21 14:46         ` Drew Adams
2020-10-20  5:11 ` Richard Stallman
2020-10-20  5:11 ` Richard Stallman
2020-10-20  5:55   ` Boruch Baum
2020-10-20  8:32     ` Eli Zaretskii
2020-10-20  9:30     ` Jean Louis

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=2d7ec6c1-3eb8-403d-8b8e-f23d4a058033@default \
    --to=drew.adams@oracle.com \
    --cc=boruch_baum@gmx.com \
    --cc=eliz@gnu.org \
    --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 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).