Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jun 2015 19:13:39 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Hiren Panchasara <hiren@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r284711 - head/sys/netinet
Message-ID:  <20150623184657.K917@besplex.bde.org>
In-Reply-To: <1435011635.33313.5.camel@freebsd.org>
References:  <201506222216.t5MMG6Io044514@svn.freebsd.org> <1435011635.33313.5.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Jun 2015, Ian Lepore wrote:

> On Mon, 2015-06-22 at 22:16 +0000, Hiren Panchasara wrote:
>> Author: hiren
>> Date: Mon Jun 22 22:16:06 2015
>> New Revision: 284711
>> URL: https://svnweb.freebsd.org/changeset/base/284711
>>
>> Log:
>>   Reverting r284710.
>>   Today I learned: iff == if and only if.
>>
>>   Suggested by: many
>>
>> Modified:
>>   head/sys/netinet/tcp_input.c
>>
>> Modified: head/sys/netinet/tcp_input.c
>> ==============================================================================
>> --- head/sys/netinet/tcp_input.c	Mon Jun 22 21:53:55 2015	(r284710)
>> +++ head/sys/netinet/tcp_input.c	Mon Jun 22 22:16:06 2015	(r284711)
>> @@ -2476,7 +2476,7 @@ tcp_do_segment(struct mbuf *m, struct tc
>>
>>  						/*
>>  						 * Compute the amount of data in flight first.
>> -						 * We can inject new data into the pipe if
>> +						 * We can inject new data into the pipe iff
>>  						 * we have less than 1/2 the original window's

>>  						 * worth of data in flight.
>>  						 */

It would be nice if people also learned to format code to 80 columns.
(This comment and its code are the only places in the file with gross
misformatting to 96 columns.  Elsewhere in the file, only the FBSDID()
line, 2 SYSCTL_INT()s, 1 comment line and 6 scattered statement lines
are not formatted for 80 columns.  Several more lines have length
exactly 80.  style(9) implicitly specifies formatting to 79 columns to
avoid line wrap for width exactly 80 on some 80-column terminals, but
I don't mind using the full 80 if necessary to avoid line splitting.)

> I think this is a bad idea.  "iff" means "if and only if" in mathematics
> and formal logic.  Comments are written in English.

No, "iff" means "if and only if" in informal mathematics and informal
logic.  It is used because being formally correct is too painful, while
plain "if" is just ambiguous or wrong.

Only very carefully written comments are written in English.  The above
comment is quite carefully written except for its indentation.  I think
some English style rules disallow writing "half" as "1/2", and both
"half" and "1/2" in it should probably be followed by "of", but I
object to following any English style rules that require replacing
small numbers like "1" by words like "one".

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150623184657.K917>