all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: help-gnu-emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: plist-put modification by side effect
Date: Sun, 01 Feb 2009 00:02:42 +0100	[thread overview]
Message-ID: <87d4e3w031.fsf@ambire.localdomain> (raw)
In-Reply-To: <20090131210630.GC17573@stats.ox.ac.uk> (Dan Davison's message of "Sat, 31 Jan 2009 16:06:30 -0500")

() Dan Davison <davison@stats.ox.ac.uk>
() Sat, 31 Jan 2009 16:06:30 -0500

   I don't get this. It says the plist is altered by side
   effects. So what's with the "but just to be extra careful
   use (setq ...)"  advice?

If PROP is in PLIST, the natural side-effecting operation is
to splice in the VALUE at the position of the old value.  Ok,
fine.  Now, what if PROP is not in PLIST?  How might you
implement that?  How might you implement that, differently?
How might your design decision surprise the unwary caller?

thi




  reply	other threads:[~2009-01-31 23:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31 21:06 plist-put modification by side effect Dan Davison
2009-01-31 23:02 ` Thien-Thi Nguyen [this message]
2009-02-01 16:23   ` Dan Davison
     [not found]     ` <mailman.6441.1233508294.26697.help-gnu-emacs@gnu.org>
2009-02-01 18:22       ` Barry Margolin
2009-02-02  9:55     ` Thien-Thi Nguyen
     [not found]     ` <mailman.6500.1233568748.26697.help-gnu-emacs@gnu.org>
2009-02-02 18:07       ` Andreas Politz
     [not found] <mailman.6361.1233436001.26697.help-gnu-emacs@gnu.org>
2009-01-31 22:46 ` Helmut Eller

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=87d4e3w031.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=help-gnu-emacs@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.