all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Is it ok to sort a list of overlays destructively?
Date: Wed, 28 Jul 2021 14:44:13 +0300	[thread overview]
Message-ID: <83sfzyu0he.fsf@gnu.org> (raw)
In-Reply-To: <87bl6ndlb3.fsf@mbork.pl> (message from Marcin Borkowski on Wed,  28 Jul 2021 08:06:24 +0200)

> From: Marcin Borkowski <mbork@mbork.pl>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 28 Jul 2021 08:06:24 +0200
> 
> Would it be a good idea to say explicitly in the docstrings of both
> functions that their results may be safely modified destructively?  If
> so, I can file a bug report.

My personal opinion is that stating this fact in the doc strings of
these APIs alone makes little sense: we have many similar APIs, so
will need to say the same for most or all of them, otherwise users
will become confused.

Basically, you should assume that Emacs protects itself where that is
needed, so if it handed you a list or some other data, and nothing in
the doc string warns you against doing something with that data, you
are free to do that, and if that causes unexpected results, there's
either a documentation bug or a code bug that needs to be fixed.

That said, if you still feel like filing a bug report, please do;
perhaps my is an odd-one-out opinion.



  reply	other threads:[~2021-07-28 11:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27  5:22 Is it ok to sort a list of overlays destructively? Marcin Borkowski
2021-07-27  9:40 ` tomas
2021-07-27 10:07   ` Marcin Borkowski
2021-07-27 13:49 ` Eli Zaretskii
2021-07-27 20:14   ` Marcin Borkowski
2021-07-28  2:25     ` Eli Zaretskii
2021-07-28  6:06       ` Marcin Borkowski
2021-07-28 11:44         ` Eli Zaretskii [this message]
2021-07-29 11:34           ` John Yates
2021-07-29 12:33             ` Eli Zaretskii
2021-07-29 15:11               ` 2QdxY4RzWzUUiLuE
2021-07-29 15:30                 ` Eli Zaretskii
2021-07-29 16:20                   ` 2QdxY4RzWzUUiLuE
2021-07-29 16:53                     ` Eli Zaretskii
2021-07-30 19:27               ` Marcin Borkowski

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=83sfzyu0he.fsf@gnu.org \
    --to=eliz@gnu.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.