C++ is a bad language - /g/ (#105998362) [Archived: 20 hours ago]

Anonymous
7/23/2025, 2:44:11 PM No.105998362
1563573932360
1563573932360
md5: 9e0c85ddb4e873b8e0c523ca346960dc🔍
It is time to have a proper criticism thread
>functions return value is discarded by default, you need [[nodiscard]]
>Bad implicit conversion, int to bool, bool to int
>struct and class are literally the same except that one is private by default the other is public by default, and a struct can inherit a class and vice versa
>No good discard operator _, they are planning to add it in std26
>Horrible debugging experience
>No proper attributes system, thanks to gcc and the committee
>No string interpolation
>ASCII strings are the default
>No reflection, they are adding static reflection in std26
Replies: >>105998373 >>105998661 >>105999378 >>106000386 >>106002003 >>106002112 >>106002890
Anonymous
7/23/2025, 2:46:08 PM No.105998373
>>105998362 (OP)
>It is time to have a proper criticism thread
first argument:
>YOU MUST LITTER YOUR CODE WITH NODISCARD, NOEXCEPT, [...] POST MODERNIST BULLSHIT

10/10 thread anon
Replies: >>105998440
Anonymous
7/23/2025, 2:50:36 PM No.105998406
No discard by default is a bad idea.
Replies: >>105998440
Anonymous
7/23/2025, 2:55:25 PM No.105998440
>>105998373
>>105998406
no discard by default is a necessity
This is bad
function(); // it return something
[code/]
It should be like this
auto _ = function();
[code/]
Replies: >>105998632 >>106001570 >>106006491
Anonymous
7/23/2025, 3:10:41 PM No.105998571
Every language I used that forced me to do explicit conversions everywhere annoyed me very much with it.
Anonymous
7/23/2025, 3:18:05 PM No.105998632
>>105998440
>C++ is bad streetshitting thread
>doesn't know how to supress unused return value warnings
>broken code formatting
This is why redditors and hackernews tranoids aren't to be taken serious
Anonymous
7/23/2025, 3:21:51 PM No.105998661
>>105998362 (OP)
>Horrible debugging experience
apparently you're a freetard who has never used the visual studio debugger
much better than GDB and all that other command line nonsense
Anonymous
7/23/2025, 3:31:02 PM No.105998731
Well as much as i wanted to use C it just doesn't work for my application because even the simplest printing a line to a console seems to give an error and im not sure why C is broken right now so i just use cpp cause it works and thats all i care right now.
Replies: >>105999516
Anonymous
7/23/2025, 4:54:06 PM No.105999378
>>105998362 (OP)
>no nested namespaces in std
>modular translation units werent a thing until c++20 and they still dont work
>pathetic standard library, simultaneously limited/small (no networking, odbc/sql, process, json, operating system API, etc.) and bloated with poorly implemented slop no one asked for
>ecosystem sucks ass, no standard compiler, build system, or package manager
>syntax is so fucking ugly (retards decided [[=Annotation]] was a better syntax than @Annotation for reflection annotations
>retards removed throws clause
bjarne is so retarded he might as well be a gojeet
Anonymous
7/23/2025, 5:11:11 PM No.105999516
>>105998731
>even the simplest printing a line to a console seems to give an error
Wait what? Can you post the code you're trying to run?
Anonymous
7/23/2025, 6:46:18 PM No.106000350
Do modules even solve the header/implementation problem of writing declarations twice? Or is it just some new meme feature that doesn't even work?
Replies: >>106010809
Anonymous
7/23/2025, 6:51:17 PM No.106000386
>>105998362 (OP)
>proper criticism
>posts the most superficial, irrelevant problems
Wow. Did the cniles who kept making these "Rust has bad syntax" threads, are now trying to dab on C++?
Go back to C or Go or whatever they use to nurse retards nowadays. You are not experienced enough to talk about languages for grown ups.
Replies: >>106000484 >>106000503 >>106000527 >>106000528
Anonymous
7/23/2025, 7:03:50 PM No.106000484
>>106000386
Are you retarded?
Bjarne and the committee are the exact same Cnile niggers you are complaining about, retard.
Why do you think they refuse to break backwards compatibility and adopt syntactic sugar improvements like Java did?
Replies: >>106000496
Anonymous
7/23/2025, 7:05:49 PM No.106000496
>>106000484
>they refuse to break backwards compatibility
They remove stuff every major version.
Replies: >>106000546
Anonymous
7/23/2025, 7:07:00 PM No.106000503
>>106000386
Also none of the complaints OP raised are even complaints Cniles make.
When have you ever heard Cniles complaining about implicit conversions, type safety, lack of reflection, or fucking strings which C doesn't even have?
Anonymous
7/23/2025, 7:09:26 PM No.106000527
>>106000386
C++ literally still uses snake_case for fucking struct/class names just to prevent breaking with C.
Fucking retarded language with retarded people in charge.
Lions led by sheep.
Anonymous
7/23/2025, 7:09:28 PM No.106000528
>>106000386
>>posts the most superficial, irrelevant problems
Go on, tell me about the core problems of the language that I'm not aware of ?
Anonymous
7/23/2025, 7:11:40 PM No.106000546
>>106000496
Such as?
>muh they deprecated some headers no one used
>muh gc support removed
Non issues.
Replies: >>106000647
Anonymous
7/23/2025, 7:20:11 PM No.106000647
>>106000546
Trigraphs for example
Replies: >>106000676
Anonymous
7/23/2025, 7:22:28 PM No.106000676
>>106000647
Nobody used those.
Not even Cniles use them, they removed trigraphs too.
Replies: >>106000690
Anonymous
7/23/2025, 7:23:23 PM No.106000690
>>106000676
Doesn't change the fact that they do break compatibility every now and then
Anonymous
7/23/2025, 9:03:50 PM No.106001570
>>105998440
C++ should make _ have special syntactic meaning like it does in Java.
Anonymous
7/23/2025, 9:51:29 PM No.106002003
>>105998362 (OP)
It is a bad language, but everything else is even worse, sadly. And you know, we could fix C++ if we were just willing to tell boomer corps "no, we're not maintaining compatibility with your ancient boomer C With Classes code forever, if you want to use the newest version you have to update your codebase" and start cleaning it up & fixing past mistakes.
Replies: >>106004545
Anonymous
7/23/2025, 10:02:20 PM No.106002112
smug-pepe
smug-pepe
md5: 3522b2d48459fa6ef63b2a7cc6c3c5a2🔍
>>105998362 (OP)
Skill issue, try something else that is not related to coding.
Anonymous
7/23/2025, 11:29:42 PM No.106002890
>>105998362 (OP)
>constructors are implicitly implicit and you have to manually declare explicit constructors, instead of the other way around
come on now
even java got this one right, valhalla has implicit constructors
Anonymous
7/24/2025, 2:46:59 AM No.106004545
>>106002003
trvke
Anonymous
7/24/2025, 3:06:52 AM No.106004723
>>functions return value is discarded by default, you need [[nodiscard]]
you are probably spot on on the other things (if they are true) but this one is completely reasonable
sometimes you just care about causing some side effect
Anonymous
7/24/2025, 7:36:49 AM No.106006491
>>105998440
Your formatting is shit. Consider instead:
// This is bad. It should return something.
function();
// It should be like this:
auto _ = function();


Also, there's nothing wrong with discarding a return value.
Anonymous
7/24/2025, 12:31:42 PM No.106007962
just code in C.
everything works and there's no need for OOP whatsoever
Replies: >>106008472
Anonymous
7/24/2025, 1:59:38 PM No.106008472
>>106007962
>C++ is bad
>so downgrade from that to the language directly responsible for all its problems
Replies: >>106009749
Anonymous
7/24/2025, 4:51:04 PM No.106009749
>>106008472
Nta, but isn't the problem with c++ that it tries too hard to be compatible with c, not that c is a bad language by itself?
Replies: >>106010831
Anonymous
7/24/2025, 7:17:25 PM No.106010809
>>106000350
It is a meme
Anonymous
7/24/2025, 7:20:25 PM No.106010831
>>106009749
Honestly the problems with C++ have nothing to do with C, they're basically all self inflicted.