Why not use GObject?
GObject, the C++ implementation by a True C Believer.
Common libraries and data structures for C
31–40 of 148 posts
Re: Common libraries and data structures for C
#32I'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…
Again, what do you mean by 'time drain'? Do you know how many human years were saved because 'grep' doesn't have to wait for the Java Hotspot VM to start up? If you spend an extra week to write a program that runs 10 seconds faster, you only need 14400 users to break even. If you've got a million users, you've singlehandedly saved humanity 115 _days_. That's a massive amount of time saved.
You must mean that you've got to code up some idea in whatever way possible so that it sees the light of day asap, regardless of how slow it is, how much energy it uses and how much disk space it consumes, because you need to sell something to someone. That's not what C is for.
C exists to write fast programs, not to write programs fast.
Re: Common libraries and data structures for C
#33Eventually I rolled my own [1] more focused library. It's basic and portable.
0: https://begriffs.com/posts/2020-08-31-portable-stable-softwa... 1: https://github.com/begriffs/libderp
Re: Common libraries and data structures for C
#34I work in C++ daily and there is something about the simple-ness of C that I love. You get out of magical hell that is templates and return to simple flat-functions and macros.
Re: Common libraries and data structures for C
#35For people advocating use of C++ instead of C, keep in mind there are several platforms (mostly embedded) that only support C and not C++. Also there are many projects that make use of C only. If C++ is available, I agree one should use it, however that is not always the choice.
Re: Common libraries and data structures for C
#36I work in C++ daily and there is something about the simple-ness of C that I love. You get out of magical hell that is templates and return to simple flat-functions and macros.
Rust's traits are generics done right. I haven't looked at Concepts too much, I hope that they'll be better than templates.
Re: Common libraries and data structures for C
#37Go and Rust are similar in that aspect.
Re: Common libraries and data structures for C
#38I work in C++ daily and there is something about the simple-ness of C that I love. You get out of magical hell that is templates and return to simple flat-functions and macros.
Re: Common libraries and data structures for C
#39Why not use GObject?
Re: Common libraries and data structures for C
#40For people advocating use of C++ instead of C, keep in mind there are several platforms (mostly embedded) that only support C and not C++. Also there are many projects that make use of C only. If C++ is available, I agree one should use it, however that is not always the choice.
C is very simple, while C++ is a monster with 100 heads, each speaking in another language.
If all members of a project use the same subset of C++, then yes, it would be preferable over C. But if anyone or any team in a large project uses whatever he wants, things can get pretty complicated, pretty fast.