git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] Teach 'diff' about 'nodiff' attribute.

From
APAndy Parkins <andyparkins@gmail.com>
Date
Apr 13, 2007, 11:30 UTC
Message-ID
<200704131230.41594.andyparkins@gmail.com>
In-Reply-To
<461F602C.E9803108@eudaptics.com>
On Friday 2007, April 13, Johannes Sixt wrote:
> -- Hannes "Can't we not have no double negation please?" Sixt

There's nothing wrong with double negatives per se. They often confer more meaning than simple logic would suggest.

For example:
 I can't not hate CVS
 I hate CVS

Logically identical, but semantically different. In the first, the speak would be suggesting that they've tried, but failed, to like CVS; in the second the speaker just hates it. Language isn't logic, it's fuzzy logic :-).

The reason I think it's relevant to bring this up is that I think identifier naming in programming should try to use language to lead the reader down the same thought path as the writer.

You want a flag that controls whether a thread is running - should it be called RunFlag or StopFlag?

 while( RunFlag )
 while( !StopFlag )
I think that the context is important.

I, personally, wouldn't like to say which is correct in that case - or in the "nodiff"/"!diff" question. However, I don't think it's correct to universally rule out all double negative use - they have their place.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Johannes SixtNext: Johannes Sixt
Message 3 of 7 in “Teach 'diff' about 'nodiff' attribute.”
  1. 3/3 Teach 'diff' about 'nodiff' attribute.Junio C Hamano, Apr 13, 2007
  2. Johannes SixtApr 13, 2007
  3. Andy ParkinsApr 13, 2007
  4. Johannes SixtApr 13, 2007
  5. Andy ParkinsApr 13, 2007
  6. Nicolas PitreApr 13, 2007
  7. Julian PhillipsApr 13, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.