public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: libc-help@sourceware.org
Subject: Re: Linked List Implementation
Date: Mon, 27 Nov 2017 08:02:00 -0000	[thread overview]
Message-ID: <20171127080204.GA23012@tuxteam.de> (raw)
In-Reply-To: <CAPzG3iajbq4y=tOXMpzPuN67Z2A8U4Vh8guwhH-_HQpKv7hQDQ@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Nov 26, 2017 at 08:26:35PM -0500, Charlie Sale wrote:
> Hello glibc
> 
> I was wondering why glibc does not have any sort of linked list or related
> data structures implemented? Is glibc not the place for it, or is there
> some other reason? Because if there is no reason for there not to be a
> linked list implementation, I thought about giving it a shot. Would it be
> appreciated?

For historical reasons, mainly. But nowadays standards have settled in a
way that it doesn't make sense to pack even more into libc than currently
is. As of now, libc concerns itself with some string handling, (float,
double) numeric functions and (the biggest part) operating system
interface. And that's already a tall order, mind you :-)

See [1] for a good overview on what is there and how it came to be.

As far as I know there are no "standard" libraries for the classical
algorithms and data structures in C, although if you look around you'll
find many good implementations as spin-off of several projects.

The C++ folks have gone some way into standardizing this (cf. STL [2]),
perhaps because in C++ it's somewhat easier to express generic
algorithms.

Cheers

[1] https://en.wikipedia.org/wiki/Libc
[2] https://en.wikipedia.org/wiki/Standard_Template_Library

- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlobxnwACgkQBcgs9XrR2kbxwwCeLMbULbkh9rWhvT9jo52R/muP
1+EAn0junh8tMznQfzNSlhE1RkmXYI+l
=V+lf
-----END PGP SIGNATURE-----

  reply	other threads:[~2017-11-27  8:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27  1:27 Charlie Sale
2017-11-27  8:02 ` tomas [this message]
2017-11-27 12:02 ` Florian Weimer
2017-11-27 12:19   ` Toebs Douglass
2017-11-27 16:22     ` Florian Weimer
2017-11-27 16:38       ` Toebs Douglass
2017-11-27 16:56         ` Florian Weimer
2017-11-27 15:19   ` Charlie Sale

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=20171127080204.GA23012@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=libc-help@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).