LKML Archive on
 help / color / Atom feed
From: Linus Torvalds <>
To: Chuck Ebbert <>
Cc: linux-kernel <>,
	Andrew Morton <>,
	Vincent Hanquez <>,
	Andi Kleen <>
Subject: Re: [patch 2.6.13-rc3] i386: clean up user_mode macros
Date: Mon, 25 Jul 2005 16:13:13 -0700 (PDT)
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, 25 Jul 2005, Chuck Ebbert wrote:
> Recent patches from the Xen group changed the X86 user_mode macros.
> This patch does the following:
>         1. Makes the new user_mode() return 0 or 1 (same as x86_64)

I _really_ prefer

	x != 0



since double negation is not only a bad habit in natural languages, it's a 
bad habit in computer languages too, for exactly the same reason. It's 

Ask a hundred random C programmers what "!!x" means, versus what "x != 0"
means, and time their replies.

I will bet you $5 USD that even if they all give the right answer (and I
suspect you'll get a few wrogn answers in there too for the !! case),
they'll take a _lot_ longer answering the "!!x" version than they will the 
"x != 0" question.

And guess what? That means that the "!!x" version is worse. It means that
people don't "see" what it means - they have to think about it. And you
shouldn't have to think about something like that, you should write it in 
the obvious way in the first place.


  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-25 22:59 Chuck Ebbert
2005-07-25 23:13 ` Linus Torvalds [this message]
2005-07-26  0:20   ` Steven Rostedt
2005-07-26  2:45     ` Lee Revell
2005-07-26  1:28   ` Miles Bader
2005-07-26  1:34     ` Andrew Morton
2005-07-26  2:31       ` randy_dunlap
2005-07-27  1:57 Chuck Ebbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone