lkml.org 
[lkml]   [2022]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/11] MM: document and polish read-ahead code.
Date
On Mon, 28 Feb 2022, Andrew Morton wrote:
> On Mon, 28 Feb 2022 15:28:39 +1100 "NeilBrown" <neilb@suse.de> wrote:
>
> > When writing documentation the intent of the author is of some interest,
> > but the behaviour of the code is paramount.
>
> uh, er, ah, no. The code describes the behaviour of the code. The
> comments are there to describe things other than the code's behaviour.
> Things such as the author's intent.
>
> Any deviation between the author's intent and the code's behaviour is
> called a "bug", so it's pretty important to understand authorial
> intent, no?

When the author is writing the documentation - then yes - definitely.
When the "author" is several different people over a period of years,
then it is not even certain that there is a single unified "intent".

The author's intent is less interesting not so much because it is less
relevant, but because it is less available.

So when writing third-party post-hoc documentation, the focus has to be
on the code, though with reference to the intent to whatever extent it
is available. Bugs then show up where the actual behaviour turns out to
be impossible to document coherently.

Thanks,
NeilBrown

\
 
 \ /
  Last update: 2022-02-28 06:19    [W:0.060 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site