all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 35702@debbugs.gnu.org, juri@linkov.net
Subject: bug#35702: xref revert-buffer
Date: Tue, 28 May 2019 17:10:03 +0300	[thread overview]
Message-ID: <ec7c9059-bb81-d35c-18cb-0e3881641a56@yandex.ru> (raw)
In-Reply-To: <831s0j3ll9.fsf@gnu.org>

On 27.05.2019 19:31, Eli Zaretskii wrote:

>>> Although in theory there could indeed be an infinite number of values,
>>> in practice the current actual set is very small, and can be easily
>>> described.
>>
>> And yet, it's not hugely important to the code that's calling it.
> 
> It was important to me.  You prodded me to ask questions and tell you
> what made the code reading difficult for me, remember?  Now you are
> trying to convince me that it isn't a difficulty, or that I shouldn't
> be asking for that?

I'm sorry to disappoint. I'm sure you understand that there are question 
I can answer but I'd have hard time converting into code comments.

Here are the kinds of questions I was hoping for:

* What does this function/variable do, or what is it for?

These can translate into [improvements for] docstrings or into top 
Commentary.

* Given the stated purpose of <function> why does it implement it *this 
particular way*?

These can translate into inline comments.

As such, I can answer your question (probably already did), but since 
IMO they are not about xref--fetcher or xref--show-defs, I can't put the 
answers into nearby comments.

So instead I ended up thinking of a few questions along these lines and 
asking them myself, hence the resulting commit that added some more 
documentation.

>> So previously, we passed a list of xrefs to xref--show-xrefs. Now we
>> pass a function that returns said list instead. It's a fairly trivial
>> change by itself, so if the previous state of affairs was okay, the new
>> one shouldn't require a lot of new documentation.
> 
> You assume that the previous state was okay, which is not a given.
> Moreover, you assume that the reader remembers there was a list
> before, and can therefore "easily" translate this knowledge to the new
> code, instantly understanding that the function now returns the list
> that was previously passed as argument.  That's a lot of assumptions.

Hopefully the new docstrings will make understanding all that easier anyway.

>> That depends on the level of detail you would like. The minimal level
>> description is in the docstring, and it should be fine for understanding
>> any code that uses FETCHER.
> 
> I hope you trust me to have read every bit of comment and doc string I
> could possibly find before complaining.

Well, there was some extra documentation added in the meantime, and I'm 
not sure how you feel about it.

>> The general way we describe our code could, of course, be improved, but
>> I don't subscribe to the idea that we can have a general overview of the
>> system no matter where we start reading the code.
> 
> See, I was sure I will get a response like that, which was why I
> marked what I wrote as <rant>.  If you don't intend to humor requests
> for more documentation of the code's workings, then why do you respond
> to such rants?
I did suggest some other places where new commentary can go.

Maybe you could propose something else as well, now that I've tried to 
explain why your previous suggestion is hard for me to do. If I 
interpreted it correctly, at least.





  reply	other threads:[~2019-05-28 14:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-12 19:45 bug#35702: xref revert-buffer Juri Linkov
2019-05-24  1:51 ` Dmitry Gutov
2019-05-24  8:36   ` Eli Zaretskii
2019-05-24 10:09     ` Dmitry Gutov
2019-05-24 12:25       ` Eli Zaretskii
2019-05-24 12:57         ` Dmitry Gutov
2019-05-24 14:10           ` Eli Zaretskii
2019-05-24 14:26             ` Dmitry Gutov
2019-05-24 15:02               ` Eli Zaretskii
2019-05-24 22:35                 ` Dmitry Gutov
2019-05-24 15:15             ` Dmitry Gutov
2019-05-24 19:35               ` Eli Zaretskii
2019-05-24 20:51                 ` Dmitry Gutov
2019-05-25  7:39                   ` Eli Zaretskii
2019-05-25 15:47                     ` Dmitry Gutov
2019-05-25 16:06                       ` Eli Zaretskii
2019-05-25 16:14                         ` Dmitry Gutov
2019-05-25 16:49                           ` Eli Zaretskii
2019-05-25 21:33                             ` Dmitry Gutov
2019-05-26 16:44                               ` Eli Zaretskii
2019-05-27 14:54                                 ` Dmitry Gutov
2019-05-27 16:31                                   ` Eli Zaretskii
2019-05-28 14:10                                     ` Dmitry Gutov [this message]
2019-05-28 18:41                                       ` Eli Zaretskii

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=ec7c9059-bb81-d35c-18cb-0e3881641a56@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=35702@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    /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.