Why c++ is the best: Freedom

>1/2
One word answer: FREEDOM
Simply put: I value freedom over imaginary safety. Yes c++ allows you to completely cluster fuck you program if you choose to or don't know what you're doing, but you can also create a pretty fast running master piece if you have the know how.
There are many programmers who are willing to give up their coding freedom for some sense of imaginary safety, meanwhile all they really get is less freedom and the same if not less safety but hidden behind curtains in a manner as to make them FEEL as if their code is """always safe""" c++ on the other hand says "look this shit is as safe or as dangerous as you want it to be, its up to you to use these tools the way YOU want to create YOUR vision as YOU see fit"

Another important note, perhaps the most: '&'
The motherfucking ampersand, hot damn I have never loved anything in programming as much as this.
I do not know of a single other language that gives you the freedom to
>pass primitive by value or reference
>pass data structures/classes by value or reference
>literally at will pass whatever the fuck you want however the fuck you want, hell you can even pass by pointer
>utilize pointers as much or as little as you want
>manage your own memory.
To add to that, ITS MY MEMORY therefore I WISH TO MANAGE IT. I don't need mommy garbage collector, or worse, to handle my memory in any way. If I want a memory leak in c++ and want to have my hello world program take up 6gs of ram? Well its damn well my right to. Oh you don't like it? Simple solution: don't use my program.
Of course a lot of this is hyperbole but its to drive home the point which still stands: Free programmers use c++
Oh you're ocd or something and NEED to write out all namespaces in full such as std::map::iterator? feel free to do so
Oh you're more casual and like using "auto"? feel free to do so as well

Attached: return (you);.png (1200x1349, 68.63K)

Other urls found in this thread:

yosefk.com/c fqa/
twitter.com/SFWRedditVideos

>2/2
Yes some aspects can be shitty, like the weird shit they've been introducing in the more recent iterations of c++, but again YOU HAVE THE FREEDOM TO DISREGARD IT ALL AND PROGRAM AS YOU PLEASE

Oh you want to write c++ exactly as if it were c? Well that's a damn odd choice instead of just using c, but go ahead
Oh you want basically c with classes and stl data structures? have fun
Oh you want to write logical legible c++? go for it
Oh you want to write the most esoteric shit a scrumlord could ever have the nightmare to be in charge of reviewing? Go get em tiger

Something people complain about is undefined behavior. Yes I can see some merit to your arguments, however my rebuttal once again is: If you have the know how, you can define as much or as little as you please in your projects/programs.

What else to touch on? Well some last points: I bet dollars to donuts both the best and the worst currently existing(in the universe) code is written in c++
Redundant, but once again, say it aloud to yourself: I want to give up how much freedom I have when I write my code, to FEEL safer. Say that out loud while looking at yourself in the mirror. Is that really a statement you enjoy saying? Do you also only limit yourself to plastic sporks when eating food?

People will say "oh but it takes longer to code in c++" - Subjective but sure I'll give you that. Would you rather buy the house quickly cobbled together in a day which could be gone by next week, or the house that took a year to build but will still standing for a century without maintenance and a millennium with?

>3/2 std::overflow_error
Now a final point. No I'm not saying c++ is the best language for any situation. When I want to webshit I use javascript. When I want to build something where easy cross compilation is my number one goal I begrudgingly use java. When I want to automate tasks on nix I use python, or bash. And so on and so forth. But in terms of how much respect the code gives you? Hell for decades and 'till this day, c++ cant be beat and at this rate I doubt it ever will. Next thing you know, people will start saying Python is unsafe because its essentially c boilerplate, though far removed it is.

>tl:dr Feel free to not use and not like c++, but if you say its because of it "not being safe" I genuinely feel bad for you, to be in such a mental prison. Any rebuttals?

i guess you don't watch the news. Freedom is illegal now.

Why is "this" a pointer and not a reference?

Have fun.
yosefk.com/c fqa/

Again freedom. You CAN turn it into a reference "*this"

>YOU HAVE THE FREEDOM TO DISREGARD IT ALL AND PROGRAM AS YOU PLEASE
No you don't, that's the worst part. For example, you cant use RAII without exceptions.

Attached: zig.png (153x153, 4.27K)

just return an optional

C is the more sane answer if you really autism

> imaginary safety
Rust safety constructs aren't imaginary. this isn't an opinion, it's a fact, Rust has safety features that C++ doesn't have. If you deny this you're speaking from emotion and/or ignorance like a redditor.
> but you can also create a pretty fast running master piece if you have the know how.
"pretty fast" is an understatement. If you only need "pretty fast", even Go and Java are enough. If you need high performance, C++, Rust and C are all great options.
> There are many programmers who are willing to give up their coding freedom for some sense of imaginary safety
you sound like an enthusiastic, retarded beginner. What freedom are you giving up exactly? You still have to manage lifetimes in C++. Again, Rust's safety features are not imaginary just cause you don't understand or need them.
> less safety but hidden behind curtains in a manner as to make them FEEL as if their code is """always safe"""
see above. You're a fucking retard and have no idea what you're talking about. I honestly doubt you have the brainpower for C++ if you're this dumb.

We're talking about defaults here. Why is it not a reference? It doesn't make sense for it to be null.

That's not RAII, though.

It’s interesting that you say I’m speaking from emotion, but then proceed to go on a rant defending rust regardless of the fact it was neither attacked nor even named in the op.

Bjarne talked about this, faggot, go read

>C++ on the other hand says "look this shit is as safe or as dangerous as you want it to be, its up to you to use these tools the way YOU want to create YOUR vision as YOU see fit"
no it doesn't, that's the problem. You can enter into undefined behavior very easily, and UB isn't a vision it's simply bad code. You have to be very careful with move semantics and really study the language to use it effectively. Fucking up a move is just that, a fuckup, it's not freedom or some unique vision. Brainlet.
>pass primitive by value or reference
>pass data structures/classes by value or reference
>literally at will pass whatever the fuck you want however the fuck you want, hell you can even pass by pointer
I'm pretty sure even C# has this.
>utilize pointers as much or as little as you want
did you just learn how to code yesterday? pointers are not unique to C++.
>manage your own memory.
C, D, Zig, Rust, Fortran
>If I want a memory leak in c++ and want to have my hello world program take up 6gs of ram? Well its damn well my right to
>Oh you want to write the most esoteric shit a scrumlord could ever have the nightmare to be in charge of reviewing? Go get em tiger
good news: you can be a retarded monkey who writes shit code in other languages too. Even in Java and Python you can have memory leaks! the world is yours, brainlet.
>Oh you're more casual and like using "auto"? feel free to do so as well
like var in let in any other language? wow!
> If you have the know how, you can define as much or as little as you please in your projects/programs.
this isn't a rebuttal. You're basically saying "if you don't want to make mistakes, just don't make mistakes :)". This kind of mentality usually comes from the most pretentious retards who shouldn't be touching C++ with a ten foot pole and should instead remain in frontend webshit where they belong.

you're obviously talking about Rust and not fooling anyone faggot. and if you didn't, you're still getting BTFO by one example of safety not being imaginary. Replace nearly all instances of "Rust" with "[ANY GC'D LANG]" and you're still BTFO.

and one last thing: you must be over 18 to post here. Don't come back here until you're an adult and can make your wall of texts have a coherent argument beyond fawning over a fucking programming language. C++ has many pros, many cons, and you didn't list a single one of them. I could make a better argument for C++ than you did in that entire wall of text, in like 2 sentences. Language worship has to be some of the most brainlet pseud shit you can do.

I’m not saying don’t make mistakes, I’m saying if something is undefined you can choose to define it in your implementation.

Well rust is one of them. But I was thinking of all of them. Java, python, go, and many many more. If I never leave my house and live alone and only use a plastic spork I’ll be safer right? I never said they provide NO safety, I said it’s mostly an illusion of safety and the trade off isn’t worth it. Again, I must ask: which of us has the emotionally charged argument? In fact for me this is only a discussion, not an argument.

Name one other language where I can declare a variable on the stack and then create a pointer to that variable or a reference to it and then pass that pointer or reference to a function.

>I’m saying if something is undefined you can choose to define it in your implementation.
>just write your own compiler and implementation of the language bro, easy :)
> But I was thinking of all of them. Java, python, go, and many many more
then that makes you look like an even bigger retard. I'd understand someone who is unfamiliar with Rust to not realize what makes it safer, talk out of his ass and say it's an illusion. But you're saying that GC'd language aren't memory safe and just make you FEEL safe too, which is something only a fucking moron with near zero programming experience would say.
> If I never leave my house and live alone and only use a plastic spork I’ll be safer right?
we're talking about programming languages. Grow up.
> I never said they provide NO safety, I said it’s mostly an illusion of safety
it's not an illusion you fucking retard. It is safety. the entire point of GCs is to SAFELY manage your memory for you. The point of Rust's borrow checker is to make sure your code is memory-safe. Are they 100% fool-proof? Nothing is, but they're solutions, not fucking illusions.
> Again, I must ask: which of us has the emotionally charged argument?
You, of course, because you're said nothing but bullshit and empty MUH FREEDOM buzzwords with nothing to back them up this entire thread.
> In fact for me this is only a discussion, not an argument.
and for me this is you jacking off over a programming language, for the wrong reasons.

C

Anyone here familiar with internal things in the industry in general:
Does every employee know, e.g. from Netherrealm Studios or in general from other larger aaa studios, which projects are in the works and planned?

I also have 2 questions:
1. Why is there actually no hardware that allows constant FPS, i.e. without deviation in all games and maximum details, whether 4K or 8K?

2. Is it possible with an engine like UE to copy another game that has a different engine 1:1 so that it feels the same?

If you can’t write in c++ or similar without
>exceeding array indicies
>remembering to clean up after yourself
>whatever the heck else
then sorry to say but you’re just a slob. Having my mom clean up after me forever is easier and safer than doing it myself. Seriously. How hard is it for someone to NOT exceed array indices? Or “look I needed some dynamic memeoy a few blocks of code ago and now I don’t, therefore I shall now free it”