public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Richard Knutsson <ricknu-0@student.ltu.se>,
	James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: Conversion to generic boolean
Date: Tue, 29 Aug 2006 08:47:14 -0700	[thread overview]
Message-ID: <20060829084714.9ae799a7.akpm@osdl.org> (raw)
In-Reply-To: <20060829114502.GD4076@infradead.org>

On Tue, 29 Aug 2006 12:45:02 +0100
Christoph Hellwig <hch@infradead.org> wrote:

> On Mon, Aug 28, 2006 at 05:18:04PM -0700, Andrew Morton wrote:
> > At present we have >50 different definitions of TRUE and gawd knows how
> > many private implementations of various flavours of bool.
> > 
> > In that context, Richard's approach of giving the kernel a single
> > implementation of bool/true/false and then converting things over to use it
> > makes sense.  The other approach would be to go through and nuke the lot,
> > convert them to open-coded 0/1.
> > 
> > I'm not particularly fussed either way, really.  But the present situation
> > is nuts.
> 
> Let's start to kill all those utterly silly if (x == true) and if (x == false)
> into if (x) and if (!x) and pospone the type decision.  Adding a bool type
> only makes sense if we have any kind of static typechecking that no one
> ever assign an invalid type to it.

Not really.  bool/true/false have readability advantages over int/1/0.

      parent reply	other threads:[~2006-08-29 15:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-26  3:24 Conversion to generic boolean Richard Knutsson
2006-08-28  9:32 ` Christoph Hellwig
2006-08-28  9:45   ` Jesper Juhl
2006-08-29 11:39     ` Christoph Hellwig
2006-08-28 10:58   ` Jan Engelhardt
2006-08-28 11:11     ` Bernd Petrovitsch
2006-08-28 12:17     ` Richard Knutsson
2006-08-28 19:15       ` Nicholas Miell
2006-08-28 20:55         ` Richard Knutsson
2006-08-28 21:19           ` Nicholas Miell
2006-08-28 21:55             ` Richard Knutsson
2006-08-29 11:41         ` Christoph Hellwig
2006-08-29 12:17           ` Jan Engelhardt
2006-08-29 13:26             ` Peter Williams
2006-08-29 13:56               ` Jan Engelhardt
2006-08-29 12:48           ` Alan Cox
2006-08-29  0:18   ` Andrew Morton
2006-08-29  1:15     ` Nick Piggin
2006-08-29  5:58       ` Jan Engelhardt
2006-08-31  3:50         ` Dmitry Torokhov
2006-09-03 12:51           ` Pavel Machek
2006-08-29  7:29       ` Anton Altaparmakov
2006-08-29 11:46         ` Christoph Hellwig
2006-08-29 12:18           ` Anton Altaparmakov
2006-08-29 11:45     ` Christoph Hellwig
2006-08-29 14:10       ` Richard Knutsson
2006-08-29 15:47       ` Andrew Morton [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20060829084714.9ae799a7.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ricknu-0@student.ltu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox