From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: [patch] Workqueue Abstraction, 2.5.40-H7
Date: Tue, 1 Oct 2002 19:53:39 +0000 (UTC) [thread overview]
Message-ID: <ancug3$iq1$1@penguin.transmeta.com> (raw)
In-Reply-To: Pine.LNX.4.33.0210011210030.1878-100000@penguin.transmeta.com
In article <Pine.LNX.4.33.0210011210030.1878-100000@penguin.transmeta.com>,
Linus Torvalds <torvalds@transmeta.com> wrote:
>
>Pease don't introduce more typedefs. They only hide what the hell the
>thing is, which is actively _bad_ for structures, since passing a
>structure by value etc is something that should never be done, for
>example.
Btw, just to avoid counter-examples: Linux does use structures and
typedefs occasionally to hide and force compiler typechecking on small
structures on purpose. We have a few places where we do things like
typedef struct {
unsigned int value;
} atomic_t;
(and similar things for the page table entries etc).
This is done because the things are often really regular scalars, but we
use the structure as a strict type checking mechanism. In this case,
using a typedef is fine, because we don't actually ever want to _access_
it as a structure, and the typedef provices exactly the kind of
information hiding that we need.
But type hiding for a real structure just doesn't make sense, since we
use it as a true structure, and hiding information just makes it harder
to see.
Linus
next prev parent reply other threads:[~2002-10-01 19:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-01 16:24 [patch] Workqueue Abstraction, 2.5.40-H7 Ingo Molnar
2002-10-01 17:55 ` Kai Germaschewski
2002-10-01 21:27 ` Ingo Molnar
2002-10-01 18:04 ` Jeff Garzik
2002-10-01 18:52 ` Ingo Molnar
2002-10-01 21:06 ` Jeff Garzik
2002-10-01 21:30 ` Ingo Molnar
2002-10-01 19:16 ` Linus Torvalds
2002-10-01 19:53 ` Linus Torvalds [this message]
2002-10-01 21:32 ` Kristian Hogsberg
2002-10-03 18:44 ` Ingo Molnar
2002-10-04 23:20 ` Kristian Hogsberg
2002-10-02 4:22 ` Christoph Hellwig
2002-10-01 21:31 ` Ingo Molnar
2002-10-02 8:22 ` Oleg Drokin
2002-10-08 3:50 ` Jeff Dike
-- strict thread matches above, loose matches on Subject: below --
2002-10-01 18:52 Marc-Christian Petersen
2002-10-02 3:58 ` Christoph Hellwig
2002-10-01 20:29 Ingo Molnar
2002-10-01 20:49 ` Linus Torvalds
2002-10-01 21:21 ` Ingo Molnar
2002-10-02 3:23 ` Miles Bader
2002-10-02 19:18 ` Randy.Dunlap
2002-10-01 21:09 ` Jes Sorensen
2002-10-01 21:35 ` Ingo Molnar
2002-10-03 1:38 ` Kevin O'Connor
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='ancug3$iq1$1@penguin.transmeta.com' \
--to=torvalds@transmeta.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.