Live data from Hacker News

Common libraries and data structures for C

github.com

11–20 of 148 posts

Re: Common libraries and data structures for C

#11
post #4

Why not use GObject?

I think writing your own portable C functions is something every programmer wants to own at some point in their young career. Then you grow up and realize there are entire organizations that have spend tens of thousands of man-hours providing the same code, but done correctly and with intent (and consistent philosophy). GObject is that philosophy, but lots of people never hear about it until someone says "Why not use…

This is completely anecdotal, but when I was looking for something like this ~10 years ago (and was just beginning to learn about the wider Linux ecosystem outside of libc), I stumbled upon GObject and completely ignored it because of its association with GNOME. My initial thoughts was that GObject was only really useful if you were building things for the GNOME ecosystem and wrote it off completely. I also did the same with GLib.

I know now that the association only really goes as far as who maintains it, but if it wasn't for how it was branded, I probably would have been using it in a lot more of my projects.

Sounds kind of stupid, but never underestimate how branding can affect how your project gets used. Especially by people who are unfamiliar with it.

Re: Common libraries and data structures for C

#13
I'm not a C developer, nor have I ever been interested in developing with it.

From my perspective, it seems like a massive time drain and non-productive use of my time. Just a few points:

- Tooling seems all over the place (build system, package management)

- Having to roll your own trivial functions / types (tooling may play into this)

- Versioning is confusing (C99, C11, ???)

The only advantage I see would be in embedded software because C is supposedly supported on a lot of platforms and is performant. But, I'm not actually sure this is true in practice.

Can you write one file of C code and compile it easily for multiple platforms or is there a lot of caveats?

Re: Common libraries and data structures for C

#14

I'm not a C developer, nor have I ever been interested in developing with it. From my perspective, it seems like a massive time drain and non-productive use of my time. Just a few points: - Tooling seems all over the place (build system, package management) - Having to roll your own trivial functions / types (tooling may play into this) - Versioning is confusing (C99, C11, ???) The only advantage I see would be in em…

C is of course a terrible waste of time for most tasks today. It is performant and widely supported though. The main thing with it is that you simply cannot avoid it in certain areas, it's C or bust.

Now, let's talk about how much time C++ wastes ;)

Re: Common libraries and data structures for C

#15

I'm not a C developer, nor have I ever been interested in developing with it. From my perspective, it seems like a massive time drain and non-productive use of my time. Just a few points: - Tooling seems all over the place (build system, package management) - Having to roll your own trivial functions / types (tooling may play into this) - Versioning is confusing (C99, C11, ???) The only advantage I see would be in em…

Been doing it for 15 years. C is a very stable target and easy to use. Portability doesn't come out of the box but is doable with a single abstraction library of your preference.

Re: Common libraries and data structures for C

#17

I'm not a C developer, nor have I ever been interested in developing with it. From my perspective, it seems like a massive time drain and non-productive use of my time. Just a few points: - Tooling seems all over the place (build system, package management) - Having to roll your own trivial functions / types (tooling may play into this) - Versioning is confusing (C99, C11, ???) The only advantage I see would be in em…

[deleted]

Re: Common libraries and data structures for C

#18
post #10
post #7

Good stuff. void* in itself is great for generics. C does support a templating system, like C++, with a little (reasonable) preprocessor abuse. It gives great cache contiguous results: https://www.github.com/glouw/ctl

Probably best to disclose you're pitching your own baby to us. What do you feel this content adds in context of the article? I can't tell.

You mean why would anyone link another useful C library in a thread about C libraries - you can't tell?

Re: Common libraries and data structures for C

#19
post #18
post #10

Earlier quoted context omitted.

Probably best to disclose you're pitching your own baby to us. What do you feel this content adds in context of the article? I can't tell.

You mean why would anyone link another useful C library in a thread about C libraries - you can't tell?

Without any explanation it's probably not useful to most of us.
Post reply on HN