svn commit: r274513 - in projects/sendfile/sys: kern sys

Bruce Evans brde at optusnet.com.au
Sat Nov 15 02:35:11 UTC 2014


On Fri, 14 Nov 2014, Ian Lepore wrote:

> On Fri, 2014-11-14 at 21:25 +0300, Gleb Smirnoff wrote:
>> On Fri, Nov 14, 2014 at 10:23:51PM +0400, Sergey Kandaurov wrote:
>> S> On 14 November 2014 18:55, Gleb Smirnoff <glebius at freebsd.org> wrote:
>> ...
>> S> >  #define        M_NOTREADY      M_PROTO1        /* m_data not populated yet */
>> S> >  #define        M_BLOCKED       M_PROTO2        /* M_NOTREADY in front of m */
>> S> >  #define        M_NOTAVAIL      (M_NOTREADY | M_BLOCKED)
>> S> > +#define        M_SBCUTTED      M_PROTO3        /* mbuf was sbcutted out */
>> S>
>> S> Seriously? There's no such word in (modern) English :).
>>
>> I also had such feeling, but translate.google.com convinced me wrong :)
>
> Cutted is not proper modern English.  It is listed by some dictionaries
> as dialectical and nonstandard.  I've been speaking English for a bit
> less than 55 years and I've never once heard anyone say cutted, or seen
> it in writing.

That's "cutted".  Doesn't everyone say "sbcutted"? :-)

It is still not useful to echo an identifier's name in a comment when
describing what the identifer means.

You should also consider using an English word in the identifer.  That is
done for "BLOCKED".  "block" is a less irregular verb than "cut", so it
can express delicate tenses more clearly.  However, this is not usually
done for "block".  Blocking flags used to be consistently spelled without
the "ED".  Now in <sys>, there is 1 spelled with an "ED" and about 18
without.  Many of the "BLOCK" flags are initially for the action of
creating a block, and "BLOCKED" is a wrong tense for that.  But when a
"BLOCK" flag is tested and found to be set, it means that something is
blocked, and "BLOCKED" has a better tense for that.  More complicated
tenses might be more correct but are usually avoided in identifiers;
EWOULDBLOCK is an exception.

Bruce


More information about the svn-src-projects mailing list