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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]