Fuck this horrible fucking language, why does programming have to be so incredibly tedious and difficult?

Fuck this horrible fucking language, why does programming have to be so incredibly tedious and difficult?

Attached: serveimage.png (306x344, 15K)

Other urls found in this thread:

isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-order
gist.github.com/bkaradzic/2e39896bc7d8c34e042b
catb.org/esr/structure-packing/
docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default
twitter.com/NSFWRedditGif

1st, think of it as C, but structs can have functions
2nd, think of object inheritance as an extension of structs and data encapsulation
3rd, think of namespaces as a way to organize header files
4th, think of generic types as a way of handling objects
5th, realize that operator overloading is just a special notation for some functions
6th, realize that the = operator is the definition of reallocating data.
6.5, By giving a formal definition for reallocation, we can now understand why object return-by-value and pass-by-reference are easier ways to code complicated structures and computations

7th, that's it. congrats. C++ is an intuitive extension of ANSI C

I can't do it. I do all of that and my proffessor just slams me, twists his boot on my stomach and spits on me. Even if my program works perfectly, he will get angry at menial shit like the order of class member declarations.

either you are worse at the language than you think, your professor is autistic, or both. sorry user.

C++ is pure bloat full of useless shit, use C.

You don't need classes, namespaces, templates and operation overloading, you're just needlessly complicating the language for no added value.

If you con do it in C++, you con do it in C with a cleaner, more elegant code.

> classes
you already have structs and instead of methods pass to a function the struct
> namespaces
you have prefixes, an example is opengl
> operation overloading
you can accomplish the same exact effect with add(object, other) instead of object += other. This is my opinion but I prefer the C way.
> templates
Somewhat useful thing but not necessary

>You don't need classes, namespaces, templates and operation overloading, you're just needlessly complicating the language for no added value.
For your uses perhaps. There are cases where these features are very useful

>t. C hacker syndrome carrier

The point is that you already have these features in C but in C++ they are needlessly complicated.

not sure if that's the case: member values should be declared and initialized in the same order, especially relevant if the initialization contains a side effect
C++ Core Guidelines C.47 isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-order

could you post some snippet he had a problem with?

CS professor tend to be autistic and make up their mind with stupid rules

No, you don't. You are delusional.

>i'm a special snowflake who wants to use a programming language that hasn't had anyone take it seriously for 20 years
You C idiots are cancer like the Haskell morons before you.

>worse at the language
I have literally no idea what's going on or why it's going on. I just copy what my assistants/professors do and that's that.
I've never been in a situation where I've thought "Whoa! You can't do THIS in C!"

gist.github.com/bkaradzic/2e39896bc7d8c34e042b
here it is niggas.
thank me later.

>I have literally no idea what's going on or why it's going on. I just copy what my assistants/professors do and that's that.

Attached: svd.jpg (1034x724, 49K)

???

Wrong image, that's guardbro by the way.

Attached: a common mistake for beginners.png (354x378, 140K)

>order of class member declarations.
or just bad alignment, that the same issue as in C
catb.org/esr/structure-packing/
struct (and class in C++) members need to be aligned to the multiple of their size, so if you have
>1-byte, 2-byte and 1-byte members
they get aligned as
>1-byte (1-byte gap), 2-byte, 1-byte (3-byte gap) = 8 bytes total
while reordering to 1 1 2 or 2 1 1 would produce 4 bytes total

uuughhhhh why doenst the compiler do that for meee

at least compiler can give you warning that this is happening (-Wpadded)

what is -Wpadded and where do I put it

oh boy are you one of those people who program on Windows with MSVC compiler?

Yes, it's really simple and lecturers told us to use it.

correction: the last gap is 1 byte = 6 bytes total, never know what rule is for the tail gap

it's a different warning flag in MSVC, but no idea how to add them in Visual Studio or which are relevant
docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default

here it would be the C4820-bytes flag, you obviously don't want to have this turned on all the time because there are cases where you can't avoid some padding

why would you willingly use printf over cout?

Because you are using the primitives. Hang in there.

C is garbage, I don't see how it is an improvement

binary size, dependability on libraries, e.t.c..
>the most relevant programming language for almost half a century is garbage.
god damn it, I hate those underaged fa/g/Jow Forumsots.

Because programming, especially close to the metal, IS!!!! hard.

>binary size
8MB of cache is the norm now
>dependability
>what is static linking

It's not hard, you're just a tard.

Fuck you, you think you're hot?

No. I'm not hot. I'm high enough in the IQ department to be able to afford AC. You live in a hut made of your own poo.

Attached: 1523756432586.jpg (2000x2000, 489K)

LITERAL AUTIST

Damn bruh, I must've struck a nerve. But you got me. Here is a selfie of myself tipping me fedora.

Attached: 1cbc001ffb38c26f2d155218e648ccbf2e25c0b31f325ec84a00e72a670b0c9e.png (800x1051, 551K)

you fucking idiot, you can use this kind of programming in C++ in many applications, including embedded s/w.

sepplesfags are bad but cniles are almost worst

> why does programming have to be so incredibly tedious and difficult
Because C++ is a steaming pile of shit, that's why.

What's wrong, HRT side effects got you angry?

so what?

>why does programming have to be so incredibly tedious and difficult?
because solving real technical problems is never going to be easy