What is it about this language that attracts such smug retarded faggots?

What is it about this language that attracts such smug retarded faggots?

Elitists who think they are better than everyone else because their programming language is more fucking convoluted.

>Convoluted
Don't use words you don't understand kid.

You're the smug retarded faggot OP is referring to.

Why does everyone say you should learn C before C++?

>have toilet in house
>use it like a normal human being
>see pajeet shitting on street
>dude don't you have toilet at home?
>pajeet make online rant why everyone who use toilet is smug retarded faggot
It's like that.

Because C++ is a more evolved C.You should learn C before any other programming language anyway.

Because only C/C++ are programming languages, rest are trash for koders.

>Because C++ is a more evolved C.
Is it though?
I've been told by some that they require different programming habits, due to C++ being so different nowadays from its counterpart.

Only Rust is a programming language, the rest a kid toys.

yea
C + OOP = C++
You can do OOP in C too, but its way harder and takes more time.

Go back to /r/cuckhold

t. pajeet

get a segfault

C is the opposite of convoluted. The K&R book's chapter on the C standard library is only 17 pages.

brainfuck doesn't even need a single one

>rajesh calling someone pajeet

learn a real programming language, kode baby.

Brainfuck is very simple the problem with Brainfuck is readability. Brainfuck defeats the purpose of programming languages because it's more unreadable than binary.

>C + OOP = C++
Is it that simple?

pajeets code in C/C++ because they can't fit anything more advanced like Rust in their heads

Only real men code in Rust. You're the pajeet.

Actually it's more like:

C + OOP + RAII + Templates + function overloading + operator overloading + STL + Boost + constexpr + (soon) precompiled headers + (soon) modules = C++.

C++ is much better than C, just like Rust is much better than C++.

I wouldn't say C++ is C with objects it's moved long past that. Much of its syntax isn't even C like. There's really no language that I'd consider C with objects.

int main(int argc, char argv[static 1]) {
return 1[argv];

>C++ is much better than C
It's really fucking not. C is good at what C does. C++ is fucking awful at what C does and what C++ does.

Tryna talk shit on C but your program wouldn't even compile
> return 1[argv];
Har dee fucking har, we already know that argv[1] and 1[argv] are just syntactic sugar for *(argv+1)

Yeah I forgot the fucking brace, but with it it's compiles just fine except that the prototype of main is non-standard. With any other function it's fine.

>non standard
>in a discussion about C's standard library

are you retarded?

insecure dumb kids who feel threatened by C programmers superior capabilities.

The discussion was about C, you moron. Learn to read.

void foo(int array[static 17]) {}

Because theyre dumb pajeets

>c
>non standard prototype

Do you not see the problem here?

yup, it's UB
Undefined Behaviour is perfectly valid C.

Just like casting a pointer to a different type except void *, char * or itself is undefined behaviour

it just werks

int main(void) {
int x;
short *y = &x; // undefined behaviour
}

it'll just read the first 16 bytes

>Undefined Behaviour is perfectly valid C.
UB is the definition of invalid C.

It violates the "strict aliasing rule".
Using a union is the way you would properly do that.

No, it's undefined. Check the fucking standard. It's perfectly valid for this program to crash.

You don't know your own language.

What if there are different padding requirements for pointers to short and pointers to int?

Also, this is undefined too:

#include
int main(void) {
int x, y;
ptrdiff_t z = &x - &y; // undefined behaviour
}

shorts and int entering into union? Not in my America

Then there are practically no programs in valid C. Anyway, you're wrong. People specifically use undefined behavior (or implementation defined one) for speed in many programs and because they're lazy. Packed structs come to mind.

It's only valid to check the type that was most recently written to a union.

also this is undefined although valid for all 2's complement machines (ALL OF THEM)

#include
int main(void) {
assert((~2) - 1 == -2);
}

C is so retarded it doesn't even assume linear memory model which is every machine since the 1960s

>Then there are practically no programs in valid C
You're fucking stupid.
>People specifically use undefined behavior
COMPILERS use UB to speed up programs, because they are allowed to optimise based on the assumption that it never happens.
Deliberately putting UB into a program is just retarded and will lead to stupid, invalid code littered with bugs.
>Packed structs come to mind.
That's not UB. It's a C extensions, and C doesn't really say much about the alignment of types anyway.

>It's only valid to check the type that was most recently written to a union.
Only in C89. Later versions of C explicitly allow using unions to type pun.

C11 threads are not implemented as of mid-2017 (because C is dead). It is practically impossible to write multi-threaded portable programs unless you resort to inefficient wrappers.

>are not implemented
By who? There is no canonical C implementation.
If you're talking about glibc, there actually exists a patch set which is very likely to be included in the next version.

its just an internet argument, not a death life battle bro. chill out and stop taking the internet so seriously.

compile the program, notice that it gets you the lower 2 bytes.

glibc is the only thing that can be ported to Windows (90% of desktop marketshare), musl, uclib and dietlibc are utterly worthless (10% of marketshare) and MSVC doesn't even fully support C99 (VLAs).

>glibc is the only thing that can be ported to Windows
What? glibc is VERY linux specific.

Yeah, my bad. Forgot mingw is just a DLL wrapper, sorry.

Anyway, mingw ain't getting c11 threads for a long time so you might as well use embedded Linux syscalls for the same amount of portability.

>rust
lol

>You're fucking stupid
U showed him mang.

>Undefined Behaviour is perfectly valid C.
>that's how Sup Forums looks like

You should definitely adopt different habits, however you won't fully understand other people's C++ unless you know C.

C is one of the easiest languages to learn to read, I don't understand why people get their panties in a bunch when they are asked to learn it.

>write thing in C
>builds and executes
>copy the same into a C++ IDE
>builds and executes
>apparently they're different languages
Damn it's tough being a programmer! I'm so happy I don't have to understand why people argue about this!

>I've been told by some that they require different programming habits
They do, but it's still possible to program C++ as "C with classes" if you want to, although that's frowned upon.

That's because the C standard library is very lacking compared to modern languages.

Just because the code is valid, doesn't mean that it is idiomatic. I can also write a valid C program that looks like I threw dogshit onto the monitor, but it doesn't mean that that's the way I should be doing it.

>literally Objective-C or (newer syntax) Swift

try copying something other than your home assignment from university

>uni
But I don't go to a uni where we program. I was taught C++ in 5th grade (11 yo)