C++ is a dog pile of shit

C++ is a dog pile of shit.

Not even the guys that write the C++ specifications the compiler guys use can even write basic hello worlds that don't leak memory.

They keep adding useless and useless features while keeping their legacy features as well.

It's a convoluted hot pile of dog shit.

Better use C retard.

Other urls found in this thread:

harmful.cat-v.org/software/c /linus
reddit.com/r/rust/comments/27p9ol/a_quick_question_is_it_possible_to_deadlock/
rust-lang.org/en-US/conduct.html
twitter.com/SFWRedditImages

Use C#.

you can't even write procedural/functional code in C#

>Not even the guys that write the C++ specifications the compiler guys use can even write basic hello worlds that don't leak memory.
citation needed
>better use C
dropped
there is so much legitimate criticism you can pull on C++ and you chose to make yourself look retarded

#include

int
main(void)
{
std::cout valgrind --leak-check=full ./foo

==6289== Memcheck, a memory error detector
==6289== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==6289== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==6289== Command: ./foo
==6289==
==6289==
==6289== HEAP SUMMARY:
==6289== in use at exit: 0 bytes in 0 blocks
==6289== total heap usage: 2 allocs, 2 frees, 76,800 bytes allocated
==6289==
==6289== All heap blocks were freed -- no leaks are possible
==6289==
==6289== For counts of detected and suppressed errors, rerun with: -v
==6289== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

I'm the best C++ programmer on earth. Where's my 10-figure pay check?

>void parameter
>std::endl
>not capitalizing Hello

*stolen*
Lelelelelelle now give me my 10 figure paycheck

>>void parameter
Correct way to do it.

>>std::endl
Correct way to do it (if anyone should be blamed, it's Bjarne).

>>not capitalizing Hello
As was done in the original hello world by Kernighan (should have even dropped the exclamation point).

C stands for Chad
C++ stands for Cuck++

Use the features C++ adds that you actually like, ignore the rest.

>>>void parameter
>Correct way to do it.
In C it is, but it's pointless in C++.

>>>std::endl
>Correct way to do it (if anyone should be blamed, it's Bjarne).
std::endl is widely known to be inferior in every way to '\n'

aka C++++

When I have to use C++, I just use it like its C but take advantage of the things already implemented (i.e. vectors, sorting functions, strings...)
I know its wrong, but I can't help it.

It's correct helloworld program with well-defined behaviour so stfu.

>flushes output
>inferior

>2 allocs, 2 frees, 76,800 bytes allocated
wew

#include

int main() {
puts("Hello, world!");
return 0;
}


>gcc -Wall -Wextra -O0 -g -o foo foo.c
>valgrind --leak-check=full ./foo

==12904== Memcheck, a memory error detector
==12904== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12904== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==12904== Command: ./foo
==12904==
Test
==12904==
==12904== HEAP SUMMARY:
==12904== in use at exit: 0 bytes in 0 blocks
==12904== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==12904==
==12904== All heap blocks were freed -- no leaks are possible
==12904==
==12904== For counts of detected and suppressed errors, rerun with: -v
==12904== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

>C++ guys are even arguing about the implementation details of 'hello world'
>can't make this up

>int main() {
FUCKING KILL YOURSELF HOLY SHIT WHY DID YOU DO THAT I ALMOST WENT BLIND YOU FUCKING FAGGOT

I had int argc, char **argv in there but took it out so -Wall wouldn't bitch about not using it. Normally I have the same reaction.

I was talking about that curly brace.

>C++ faggots can't even write a hello world without arguing
lmao

In that case, there's no issue.

...

1TBS you faglord.

jailang will annihilate c++ on day 1, just wait for it

it will take months for solid libraries bindings and porting crypto and protocols

But I like my templates, how else am I going to feel smart if I can't do magic like CRTP, higher kinded templates and expression templates?

>not K&R elder prestige race of the ancient master gods

do it yourself, you could be waiting forever

not sure I would want to use my own tls/https library if I knew what kind of idiot made it

CEASE AND DESIST ALL POSTING OF PINK WOJAK. THIS IS BLATANT BOARD CULTURE APPROPRIATION. YOU HAVE BEEN WARNED

watchu gonna do /biz/boi, killed yourself after ur buttcoin crash yet?

But can you write a program that writes 1TB of "hello world" into a text file?

...

t. brainlet who is too dumb for C++

It's not fucking rocketscience

Agree. It was already bad though.
Adding complexity doesn't fix a bad language.

C++ should've stayed C with classes.

humanity needs to ditch header files already

c++ is not shit.every c++ tutorial out there without exceptions are shit tho.they shouldnt teach the old unsafe (c-way) of doing things .
instead of teaching const,they should teach constexpr
instead of teaching enum,they should only teach enum classes
instead of teaching c-style explicit cast,they should only teach static_cast()
instead of teaching old c-style arrays,they should only teach std::array's(they also know their size,and have debug time bound checking).

these are all smarter,safer and easier to use than their c inherited counterparts and they are the exact same speed.

you dont need to flush all the time,and endl is many times slower than '\n'

there is some other way then learning C++ against CppCoreGuidelines?

to be honest thechernoproject on youtube has the only good c++ tutorials from what ive seen so far.

They're not so much tutorials as they are explanations and discussions of C++ features, what makes them good (or bad), where you would use them, etc.. That's why his videos are good, and that's the stuff you can't find in standard tutorial videos/writeups.

You do need to flush at the last one though. Jeez people here get so fucking salty when C++ is mentioned. Hmm... it's like nobody ever did anything besides Lisp fizzbuzz and is a completely unemployable wimpy faggot. Really makes me think.

Make them unnamed params and the warning will be gone.

This is how I deal with unused params in functions derived from pure virtuals. Beats an unused macro or attribute imo.

Jailang is a language designed for gaymes. Rust is already thousand times better and is a viable replacement for C++. Jailang is nothing but a meme language.

Rust is a language designed for snowflakes. C++ is already thousand times better and is a viable replacement for Rust. Rust is nothing but a meme language.

Go back to python pajeet. Clearly you are not smart enough for to use C++.

C++ doesn't replace Rust, it existed before Rust. you fucking numbnuts.

Also, how is C++ is thousand times better than Rust if it can't handle errors and memory leaks. You clearly don't know what you're talking about.

Go back to playing your gaymes >>Sup Forums

>Also, how is C++ is thousand times better than Rust if it can't handle errors and memory leaks.
Then don't write leaky code. This is the fundamental flaw with "safe" languages. You're hoping that the computer is smarter than you, however the fact of the matter is the real solution is to not be retarded.

You're assuming that everyone is perfect and will always write bug-free code. You're forgetting that there's poo coders. We keep finding many security vulnerabilities like Heartbleed due to those coders who keep making mistakes in flawed language.
Why bother using a language that fucks you over. Why not just use a language that does a better job at catching errors that might save a lot of headaches.

>linus said C is better than C++ so it must be true

>Why not just use a language that does a better job at catching errors that might save a lot of headaches.
We do. It's called C++.

He likes C because using it keeps the second-rate C++ coders out. Also finer-grained control over system-level crap.

Can it catch bugs that can cause memory leaks, threads deadlocking, etc at compile time?
No it fucking doesn't, you fucking brainlet

harmful.cat-v.org/software/c /linus

>Can it catch bugs that can cause memory leaks
If you correctly put your new and delete in constructors and destructors like a sane person and catch exceptions, you'll never have this problem.

>threads deadlocking
Some can be caught at runtime, otherwise you can just go to an engineering school that will teach you how to program correctly instead of learning poorogramming on dinesh-java.com.

rust can detect deadlocks at compile time? please tell me more

What's with all the talk of memory? Has everyone forgotten about RAII?

Why bother doing all that if there's a compiler that can do all of that at compile time. Boom, no need to test at runtime. If you had any education at all, you'll know that finding bugs at runtime are not reliable at all especially deadlocking, deadlocking varies greatly on different computers with background programs.
Also I've noticed that your flawed brain keeps assuming that everyone is infalliable. People make mistakes all of the time. They may fuck up something at constructor/destructors or fuck up with pointers and this will be checked out OK by C++ compiler while in Rust, compiler will catch it.
Seriously, what are you, a literal retard poocoder?

You know how people is, they tend to make mistakes and fuck up their RAII procedure.

The hero we need.

reddit.com/r/rust/comments/27p9ol/a_quick_question_is_it_possible_to_deadlock/
>Our type system isn't sophisticated enough for static deadlock prevention.
He's basically talking out his ass like all rustfags.

>If you had any education at all
I am extremely confident that you have nothing to tell me about education.

If I use Rust am I obligated to follow their Code of Conduct?
rust-lang.org/en-US/conduct.html

When I said deadlock, I was thinking of data races. Despite that, Rust still catches more error than C++ compiler can and ensures no memory leaks in your compiled program. C++ can't do any of that at compile time.

1. No.
2. >He still memes about SJWs taking over tech several years after that stopped being a funny meme and after GamerGate died

put void there you mong

>Sup Forums faggots can't even write a hello world without arguing
ftfy

>When I said deadlock, I was thinking of data races.
>If you had any education at all

Does Rust do that?

Yes, except the deadlocking part

I made a mistake but you're way less educated if you doesn't think Rust is any advantageous than C++.

>C++ is a dog pile of shit.

It absolutely is. Typing "std::" over and over again is a good way to get bugs.

>you're way less educated if you doesn't

What's
>using namespace std;

(You)

Is Rust associated with SJWs or something?

Its just NEETs who likes to label "SJW" on everything they don't like

The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
-quote by someone I dont remember

Of course it's not. It's not as if the company that made Rust gave money to a fascist cuckold militia.

It was literally created because Mozilla couldn't find diversity hires that could do C++. Since the leftists didn't like the idea of hiring white people, they created a language that was friendlier to throwbacks in evolution.

(((sources needed)))

>using namespace "std"

Choosing C over C++ completely categorically is like avoiding herpes by opting for permavirginity.

Any reasonable subset of C++ that's visibly larger than C itself would be a poor choice for a kernel, but that doesn't mean that virtually every element of the C language and compilation/ABI model could not have been improved upon drastically, if not for C's overwhelming incumbency in systems programming.

Reality is the source.

>Go outside
>Look up at sky
>Say I see clouds
>Hurrr source that
This is what you sound like.

Interesting how you completely avoided answering my request by spewing that drivel. It's clear that you know nothing and are pulling things from your ass.

>Reality doesn't exist
The state of leftism and their war on facts.

wow, "lefies" and "war on facts" paired with cherry-picked facts, nice argument! You really has blown me away.
Golden star for you