Let's have a discussion about why C++ is the best programming language on Earth. Pics of Bjarne with long legs are welcome too.
C++ is the best programming language because it pretty much filters brainlets (like all sciences) while being actually useful (unlike biology) and a standard in enterprise programming. It offers all the tools that allow the programmer to flexibly choose between abstraction and performances, and is partially reverse-compatible with C for those who want even pointier control in performance-sensitive code.
The common criticism against C++ is mostly based on some mumbo jumbo of this kind: >WAAAH when I inherit a method and redefine it then upcast and call the method it doesn't work WAAAH >WAAAH I'm 200% incompetent at designing an object-oriented architecture and that made me do fucking stupid shit WAAAH >WAAAH malloc doesn't work WAAAH >WAAAH I don't get references WAAAH >WAAAH I can't template 101 WAAAH >WAAAH the language has no standard way of doing WAAAH >WAAAH I actually manage to get memory leaks with the straightforward C++ class system WAAAH
This thread is dedicated to the 3-digit IQ people who have transcended the whining of the weak. Dummies who want to know why their criticism of C++ is fucking uneducated weeb-tier opinion are free to ask questions.
the only advantage C has over sepples is being cooler
Owen Robinson
>Sup Forums LARPers who can't code for shit think C is cooler Wow, C++ BTFO
Anthony Perry
>being able to shoot yourself in the foot and introduce vulnerabilities with ease but not doing so through sheer skill >not cool
Joshua Green
>language doesn't support Unicode properly Into the trash it goes
Sebastian Walker
Great to see we agree on C.
Adam Green
Literally any byte stream like cout can do that.
Dominic Baker
What's the deal with pointers? I know what they do but I don't get them if that makes sense, I remember my programming prof was talking during a class once he said if he wants to know how good someone is at programming he'll talk to them about pointers.
Owen Harris
Several points where they can help: -Polymorphism -Avoid copying objects when passing them to functions (although you're better off using references for that)
Adrian Sanders
Yes, it can use a Unicode string it but can't tell properly how many characters it has unless it's a fixed length format like UTF-32.
Isaiah Diaz
Damnit, user. Was literally about to larp about C being cooler. REEEEE
Eli Cruz
Hang on a min... C isn't cooler?
Eli Jones
Manipulating memory addresses allows you to access variables that belong to a parent function, use dynamic allocation (and have a variable not getting deleted at the end of the function) and shorten some code. The hard thing isn't pointers but what you do with them and making the difference between arrays, pointers and array terms.
Evan Mitchell
Counting letters in UTF-8 is trivial.
Julian Parker
this, the prefix byte is easy to detect and there is an optimization possible to use known character length and make a proper jump still utf-8 iterator over string would be nice in STL
Stallman is irrelevant. He didn't write a single line of code in décades, too busy eating shit from his feet.
Nathaniel Martinez
(((Stallman))) is a NEET communist who uses Emacs and approves pedophilia. His foot-flavored opinion is worth jack shit.
Jayden White
I saw the thread and thought it'd be better to ask here - I'm not the OP of that one. Figured people here would have better arguments
Cooper Torres
c++ is shit and unless you plan on getting a job in gaymen development there is 0 reason to ever learn it or use it.
Parker Moore
Funny, I've written stuff in C and C++ that process or output unicode. Or do you mean it doesn't allow unicode in stuff like variable names? I never tried that and don't know, but have no need to put strange foreign characters or lookalikes of normal letters in my variable names.
Jack Stewart
>pointier control heh
John Bennett
I feel like an ant reading that image.
Elijah Stewart
Who seriously thinks this? C isn't perfect but it is way better than the mess that is C++. Unless your team consists of brainlets who need to be sandboxed there is no need for 99% of what is exclusive to C++. And that's not even mentioning the standard library which is worthless for any serious project unless you love things like longer compile times, including tens of thousands of template-heavy LOC to get a fucking vector or string, always using the heap for allocations (or use template-based/hacky allocator interface), using slow implementations of streams and containers, details like all versions of atomic CAS returning bool etc. C is a much simpler language, not promoting the idea of hiding every detail behind your back, and unless you are abusing macros it's usually trivial to see and reason about what transformations are being made on what data, without having to dig through layers of cruft. Having a stable ABI is another reason to choose C.
Nolan Evans
>bjaaaaaarne.jpg
Michael Miller
>claiming something subjective is objectively true >the common criticism against [thing I like] is: [list of valid criticisms] >ad hominem
checks all the boxes, this thread is going places
Zachary Campbell
>Having a stable ABI is another reason to choose C. It isn't the 90s any more, every sane sepples implementation which isn't MSVC uses the portable and stable Itanium ABI.
Jackson Torres
C++ is trash and nearly every feature added to C++ was a mistake.
Most people who critisize on C++ either Java Pajeets, Web Monkeys, or Rust fags, and only last ones has _some_ good points, not often they just screeching about problems from 90s which already were fixed long time ago.
Liam Hall
Most people who criticize on C++ either Java Pajeets, Web Monkeys, or Rust fags, and only last ones has _some_ good points, not often they just screeching about problems from 90s which already were fixed long time ago.
Chase Baker
>while being actually useful (unlike biology) So, diseases are caused by your sinful life?
Lincoln Flores
Most bad things about C++ come from C. The fucking build system and single threaded linker.
Nicholas Peterson
> unless you are abusing macros The problem is, most C code does abuse macros.
Alexander Powell
>I eat shit worse than dog food, I never wash my hands, I breathe exhausting fumes while smoking gutter shit, I do heroin and share my needle with a $2 poz Brazilian trap, I practise bug chasing, I drink one liter of soda per day, zero water, I am interested in pranism, and I bathe in my septic tank Yes, your diseases are caused by your sins.
Ryder Green
How would you know everything you listed is harmful to your health without biology?
Juan Ramirez
>implying only biologists are capable of doing double-blind randomized scientific studies
Ryan Bell
Don't move the goalpost.
Joshua Martin
Not doing that. Biology, for the most part, is trivial statistical shit.
Tyler Nguyen
>biology >not useful I guess I shouldn't be surprised by people who like C++ being retarded.
Cameron Roberts
It doesn't matter what you call it, that's still biology, as in "the study of living beings".
Dylan Ward
Epic, simply epic. Nothing like pride in ignorance.
Caleb Hall
At least, a C++ training can get me a job.
Kevin Morales
Burger flipping can get you a job as well.
Jace Campbell
The hierarchical position isn't the same thouh.
William Powell
ive noticed that any time someone acts like u do, even if i support what they're talking about personally, i feel the compulsion to hate whatever they're talking about
Bentley Jones
You all should just switch to Rust, it's basically C++: the good parts + the borrow checker.
Nicholas Brooks
>it's basically C++: the good parts No.
Parker Barnes
Rust is C++ but even less readable.
Nathaniel Martinez
Why not? It has generics, which is like templates but better, it has traits, which is like concepts but better, it has actual move semantic without "empty-but-valid" bullshit, it has no GC, it has RIIA and it's on par with C++ performance-wise. At the same time, it has no C compatibility to slow it down, no stale OOP meme, no UB bullshit, and it prevents many memory and concurrency errors at the compile time, which is nice when you don't have GC.
Aaron Jones
This.
Logan Thomas
>A language I don't know is less readable than a language I know No shit.
Ryan Ross
> Why using C-like syntax that everybody knows when you can create your own brainfuck? Not everyone is like you, bruh. Rust seemed like a cool meme, so I checked out official guides, and this syntax makes no goddamn sense.
Dylan Thomas
Pic related: a language without UB.
Parker Wilson
The syntax is 80% C++ tho, they even use for generics and :: for namespaces just like everybody do. The only unusual part about it is the lifetime specifications, but that's because lifetimes themselves are a new and unusual feature for a PL to have.
Ryder Gutierrez
Yeah right, having '!' and macros to print line in terminal, sure.
Jace Parker
macros >> printf
Luis Sullivan
How cute looking at you, trying to ignore streams in C++. If you don't understand - just say 'I don't know about modern C++ and I keep pretending that it's just C with classes'.
Grayson Jones
>Pics of Bjarne with long legs are welcome too. Contributing.
Who cares, most people just use whatever programming language the IDE uses. Eg, c++ for Arduino, Java for android apps, etc
Noah Nguyen
>whatever programming language the IDE uses
Julian James
>uneducated weeb-tier opinion Weeb here. Wrote a kernel in modern C++17. Anime website.
Carter Bell
you know it's true nigga.
Thomas Evans
Is there any good REST/web framework fro C++
Joseph Robinson
I don't know what the fuck do you mean.
Michael Reed
>Wrote a kernel in modern C++17 Easy. >Anime website. If you mean web server and app - easy.
Leo Ortiz
Neither of your examples have anything to do with IDEs, retard.
Xavier Cook
>It has generics, which is like templates but better Rust generics are nothing like C++ templates and are no where near as powerful
>it has traits, which is like concepts but better Lol, C++20 concepts are far more powerful than Rust traits.
>no UB bullshit Yes it does. Just because it's mostly inside unsafe blocks doesn't mean it doesn't have it, and don't think idiots won't abuse unsafe like they abuse UB in C++.
>and it prevents many memory and concurrency errors at the compile time By treating you like a retard.
Rust doesn't even have CTFE or non-type template parameters yet, and they have no metaprogramming. The only thing Rust has going for it is it's enum types, pattern matching, good type inference, and better move semantics. The BC on the other hand is absolutely fucking trash and outweighs all of Rusts upsides.
Bentley Sullivan
>If you mean web server and app - easy. No, I mean Sup Forums is an anime website.
>Easy. Yeah, anyone can write a shitty beginner """kernel""" by following osdev tutorials, but writing an actually good proper kernel is not easy, especially on x86 PC where the standards are 100% pure trash.