linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][2.5] Single linked lists for Linux, overly complicated v2
Date: Tue, 1 Oct 2002 18:05:15 +0200	[thread overview]
Message-ID: <E17wPWO-0005up-00@starship> (raw)
In-Reply-To: <20020930160434.Q13755@bitchcake.off.net>

On Monday 30 September 2002 22:04, Zach Brown wrote:
> but really, I think these are DOA.

No argument there.

> having to define a single magical
> structure member makes these more trouble than they're worth.  I've come
> to prefer wli's 'struct list' approach.  It has the added benefit of
> actually being sanely implementable with shared code, something
> ridiculously low memory setups might appreciate.

Have you tried it in a real program?  I have.  It's not nice to use.
My original response to Bill:

> > How's this look?
> 
> Unfortunately, not good.  You get code like:
> 
>         foo = (struct mylist *) slist_pop((slist *) &somelist->next);
>
> So type safety goes out the window, and you gain some niceness in the
> definition in exchange for ugliness in usage, the wrong tradeoff imho.

Single linked lists are so simple - just write the darn code out in
full.  Yes, the fact that you can't sanely generalize these things shows
that C as a language falls a few cards short of a full deck, but we knew
that.  It makes nice kernels, it does not make art.

-- 
Daniel


  parent reply	other threads:[~2002-10-01 16:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020926142547.N13817@bitchcake.off.net>
2002-09-26 18:45 ` [PATCH][2.5] Single linked lists for Linux, overly complicated v2 Thunder from the hill
2002-09-26 19:29   ` Rik van Riel
2002-09-26 19:43     ` Thunder from the hill
2002-09-26 20:00       ` Rik van Riel
2002-09-26 20:10         ` Thunder from the hill
2002-09-26 21:13         ` Thunder from the hill
2002-09-26 21:19           ` Thunder from the hill
2002-09-27  0:57       ` Zach Brown
2002-09-27 20:08         ` Thunder from the hill
2002-09-27 20:39           ` Zach Brown
2002-09-27 20:52             ` Thunder from the hill
2002-09-28  9:45         ` Thunder from the hill
2002-09-30 19:37         ` Daniel Phillips
2002-09-30 20:04           ` Zach Brown
     [not found]             ` <E17w7N8-0005px-00@starship>
2002-09-30 20:50               ` Zach Brown
2002-10-01 16:05             ` Daniel Phillips [this message]
2002-09-26 19:49     ` David B. Stevens
     [not found] <924963807@toto.iv>
2002-09-27  3:56 ` Peter Chubb
2002-09-27  7:27   ` Arnaldo Carvalho de Melo
2002-09-27 14:56   ` Thunder from the hill
2002-09-30 19:48   ` Daniel Phillips
2002-09-26 17:41 Lightweight Patch Manager
2002-09-26 17:53 ` Rik van Riel
2002-09-26 18:26   ` Thunder from the hill

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=E17wPWO-0005up-00@starship \
    --to=phillips@arcor.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).