Biggest advantages of C over C++? - /g/ (#105666778) [Archived: 815 hours ago]

Anonymous
6/22/2025, 2:52:19 AM No.105666778
1
1
md5: ec4987563337c692fed74ca72a5d55ac🔍
For those of you C programmers who genuinely dislike C++, what is your biggest, or what are your biggest turn-offs about C++? It seems like a much better suited tool for creating complex systems programming/projects like compilers.
Replies: >>105666807 >>105666824 >>105666832 >>105666834 >>105666907 >>105666938 >>105667573 >>105667648 >>105667928 >>105668782 >>105669507 >>105669525
Anonymous
6/22/2025, 3:01:50 AM No.105666807
>>105666778 (OP)
>For those of you C programmers who genuinely dislike C++, what is your biggest, or what are your biggest turn-offs about C++?
I like to be not productive, and code buggy piece of shit code with lots of vulns.
Anonymous
6/22/2025, 3:06:16 AM No.105666824
>>105666778 (OP)
Object-oriented programming is garbage. The STL is shit. Modern C++ is just flailing around as the language dies a slow death.

Only reason to use C++ is to write C code with some nice extras like namespaces, function overloads, default values for parameters, and operator overloads.
Replies: >>105667062 >>105667270 >>105668363
Anonymous
6/22/2025, 3:07:31 AM No.105666832
>>105666778 (OP)
No need for it. C++ templates are just macros. Classes are just structs. If you need more than that then you're programming wrong.
Anonymous
6/22/2025, 3:07:50 AM No.105666834
>>105666778 (OP)
There is generally a limit as to how fucked up things can get in plain C, but given intelligent enough retards there is no upper bound on how tragic things get with C++. In 2008-10 I witnessed two dudes reimplement and entirely replace an entire 10 person team of C++ assholes who were so far up boost's asshole they basically could never ship anything. I was just babysitting the kernel and toolchains so I had a front row seat. The C guys basically just blackboxed everything and just wrote clean C99. I'm not even sure they ever looked at the C++ beyond trying to determine what was supposed to go in and out. That job taught me to never, ever trust PhDs or C++ guys heavily into "metaprogramming".
Replies: >>105666873 >>105667723
Anonymous
6/22/2025, 3:16:06 AM No.105666873
>>105666834
I know this feel
Anonymous
6/22/2025, 3:20:47 AM No.105666907
>>105666778 (OP)
>For those of you C programmers who genuinely dislike C++, what is your biggest, or what are your biggest turn-offs about C++?
the constructor/destructor shitshow
the no abi break retardation making the stl outdated and basically deprecated for any serious software
I just don't understand wtf the committee is smoking, who the hell asked for a linear algebra header? this is peak brain damage, no one will ever use this not even the people who asked for it.
also take a look at concepts, range v3 or the submitted paper for introspection, only sick minds could ever think the syntax and the way these things work to be fine, no one will use these features outside boost and stl because it's pure dogshit.
these features are also impossible to do right without breaking things which they have to do but they won't, rust and C will eat C++ marketshare and there is nothing C++ devs can do about because the committee is full of morons

I use C++ for the syntax sugar mostly namespace and string, that's about it, if C get namespace and a good string lib one then C++ would have 0 reason to exist
tcc kiss.c
6/22/2025, 3:26:54 AM No.105666938
>>105666778 (OP)
C++ compiler and tools are bloated
I'm okay if it's <20MB
>tcc<2MB
Anonymous
6/22/2025, 3:28:45 AM No.105666956
1745845478995
1745845478995
md5: 6eb8f3373e520b6d6b507bf2dbab7f0b🔍
Anonymous
6/22/2025, 3:46:04 AM No.105667062
>>105666824
this. I learned c++ just to have to unlearn all the autism. Its a good language with good features, but the way you are conveyed you have to code, all this clean code bs, over complicating your project, its ruining your projects.
I still cant live without namespaces, basically all things you name.
Anonymous
6/22/2025, 3:51:13 AM No.105667084
1738431780864588
1738431780864588
md5: a1460d5f7dbda21a5dc22f297049778b🔍
Where's the best place to learn them both?
Replies: >>105667109 >>105667203 >>105667368 >>105668759
Anonymous
6/22/2025, 3:54:31 AM No.105667109
>>105667084
cp preference.com
Anonymous
6/22/2025, 4:07:53 AM No.105667203
>>105667084
learncpp.com

To know C++ is to know 90% or so of C
Anonymous
6/22/2025, 4:20:01 AM No.105667270
>>105666824
>you see, i read an article about inheritance, encapsulation and polymorphism once when i was in a highschool and that makes me an expert in OOP software design
Replies: >>105667404
Anonymous
6/22/2025, 4:39:19 AM No.105667368
>>105667084
cprogramming.com
Anonymous
6/22/2025, 4:46:59 AM No.105667404
>>105667270
It's a tool that will be abused. I like structs with methods as an organizational tool but once you go beyond that you're opening Pandora's box, imo anyway. Before you start autistically screeching about how you use oop for you personal projects just fine, great, you can use any style just fine, if you're the only cunt looking at the code. I'm talking about the decades of enterprise style software which is uniformly bloated, unreadable and performs like shit. People can talk shit all they want about langs like Go/C but almost anyone who has been programming in those languages for a few weeks can jump into almost any code base in those languages and can understand what's going on. Java, C# and C++ can't claim this.
Replies: >>105667946
Anonymous
6/22/2025, 5:17:58 AM No.105667573
ESP32-DOS-computer
ESP32-DOS-computer
md5: aa7452779ebe3026895b0aed06d5afdb🔍
>>105666778 (OP)
#!/usr/local/bin/tcc -b -run
// elite languages
Anonymous
6/22/2025, 5:31:41 AM No.105667648
>>105666778 (OP)
My biggest dislike about C++ is that it leaves me with no excuse to keep wanking about code instead of actually building software
Replies: >>105667693
Anonymous
6/22/2025, 5:41:28 AM No.105667693
>>105667648
JUST USE Python
Replies: >>105669865
Anonymous
6/22/2025, 5:49:45 AM No.105667723
>>105666834
Only right answer. I always use C for the core of any project and C++ around it so the codebase doesn't look too autistic to people who are used to C++.
>I was just babysitting the kernel
Do you work at Microsoft or Apple?
Replies: >>105668117
Anonymous
6/22/2025, 5:58:16 AM No.105667763
It's too bloated and has too many footguns. Even if you want to avoid all the bullshit, you basically have to abandon the STL since it will force you into sepples' footgun ridden paradigms. Templates, constexpr, and metaprogramming are useful, methods and overloading is convenient, operator overloading is very convenient for math types.
Anonymous
6/22/2025, 6:36:49 AM No.105667928
>>105666778 (OP)
some old oop-isms (inheritance, virtual functions, rule of X) are unfortunate and the standard library is full of undefined behavior and exception-based errors
a rust-like c++ would be great since rust managed to fuck up metaprogramming with their ridiculous macro system
Anonymous
6/22/2025, 6:40:50 AM No.105667946
>>105667404
people like to pick on java as example of bad oop, but that's just the nature of http frameworks built around plug'n'play components. this looks complex because the problem domain is complex.
Anonymous
6/22/2025, 6:43:56 AM No.105667970
i like runtime polymorphism, and i also think objects solve a problem that is very obvious in C programming. in C you basically have functions that only get used with a certain type of struct. it makes sense to scope that function to that struct. constructors and destructors make a lot of sense too, because you end of implementing these in C anyway. also runtime polymorphism is far safer and clearer than down casting pointers IMO, also templating common functions is convenient. multi level polymorphism is convenient because if done correctly you can write a fraction of the code, and saves u the hassle of refactoring duplicate classes. if u are sub 100 iq you will struggle to write good c++, but that is the case with any OOP language.
Replies: >>105668045
Anonymous
6/22/2025, 6:55:51 AM No.105668045
>>105667970
All of these sound like the snake oil of a 100iq wigger trying to layer on complexity onto an already working system just to stoke their ego. C had it right. You don't need more.
Replies: >>105668141
Anonymous
6/22/2025, 7:08:12 AM No.105668117
>>105667723
>Do you work at Microsoft or Apple?
I have worked at companies of that size in my career, but at the time I was working at a startup that was trying to do a document repository appliance. Remember this was just a few years into what was called amd64 (still used by Debian/Ubuntu) briefly called EM64T from Intel. Even though the place was packed with PhDs and other technically smart people (and a few very high net worth individuals, probably 1/2 a billion amongst them), the place was an absolute fucking shitshow the likes of which I'd never seen. They couldn't even do basic technology selection, like: we're going to run this line of kernels, that we can build and patch ourselves, with these libraries, that we can build and patch ourselves, using this line of toolchains, that we cab build and patch ourselves, using these development environments, customized as such, etc, etc, etc.

It was pure madness. Even just getting IT a disk image that could be deployed to PCs and servers was a 10,000% productivity improvement, then tarballs of chroots to freeze tooling and system libraries from random yum/apt update fuckery added another 100,000% productivity.

After I did that shit and could rebuild everything from source, the appliances they wanted to use had some custom buttons and LCDs and shit, so I was able to fuck off and do that and, like I said, just babysit. Jesus christ I really did drink a shit ton of beer over a summer, I think 09, watching daytime baseball, drinking coronas, and eating either chips and salsa or pretzels depending on which of the places I walked to for "lunch". Didn't get fat, though. Ah, being young.
Anonymous
6/22/2025, 7:08:40 AM No.105668119
metaprogramming:
#INCLUDE "TYPES.H"
#INCLUDE "ALGORITHM.H"
Replies: >>105668186
Anonymous
6/22/2025, 7:13:50 AM No.105668141
>>105668045
it makes it easier to write complex systems. there is a reason c++ is used so much in the industry.
Replies: >>105668184
Anonymous
6/22/2025, 7:21:36 AM No.105668184
>>105668141
https://pastebin.com/NhENNRgu
Anonymous
6/22/2025, 7:21:54 AM No.105668186
>>105668119
I do this and I look like this.
Replies: >>105668221
Anonymous
6/22/2025, 7:32:19 AM No.105668221
IMG_0348
IMG_0348
md5: ab64159088a2397f0a2d7b7221dd9bcf🔍
>>105668186
>steal this look
Anonymous
6/22/2025, 8:08:48 AM No.105668363
>>105666824
I don't see why people bitch about adding more shit to c++, just don't use it, it's that simple.
Replies: >>105668724 >>105669628
Anonymous
6/22/2025, 8:12:18 AM No.105668380
can i have boring carefree java like vibe in c++? how can one achieve it?
Anonymous
6/22/2025, 8:14:52 AM No.105668387
simplicity i guess. i'm very retarded and need a language with a standard that essentially rapes me 24/7. it's hard to explain.,
Anonymous
6/22/2025, 9:24:03 AM No.105668724
>>105668363
tell the jeets to not use it
Replies: >>105668740
Anonymous
6/22/2025, 9:26:30 AM No.105668740
>>105668724
I think that's the problem. The people bitching about it are working on projects with others.
Anonymous
6/22/2025, 9:30:32 AM No.105668759
>>105667084
at your job
Anonymous
6/22/2025, 9:37:12 AM No.105668782
>>105666778 (OP)
>what are your biggest turn-offs about C++?
It is an overly complicated language with some nice features. It has too much crap. It attempts to do a bit of everything, but it does them almost all badly. Its attempts to fix this only dig a deeper hole.
Anonymous
6/22/2025, 11:44:00 AM No.105669507
>>105666778 (OP)
C++ features without OOP is how you should be coding if you're not a pajeet.
Anonymous
6/22/2025, 11:46:48 AM No.105669525
>>105666778 (OP)
Exceptions. Their mere existence bloats code size and, in general, it's a fucking atrocious error handling pattern.

Also compile times.
Anonymous
6/22/2025, 12:03:58 PM No.105669628
>>105668363
YOU can choose not to use it. At work you also have other people working on your code, and THEY will use it.
The more tools and the more complex they are, the greater the fucktardation that someone will inevitably come up with, that you will end up having to fix
Anonymous
6/22/2025, 12:50:07 PM No.105669865
>>105667693
I'm using it too tho