Will C++ ever be replaced? What is your opinion on the language itself?

Will C++ ever be replaced? What is your opinion on the language itself?

The only well written C++ programs are basically just C programs

C++ would be a great language if not for all the badly thought-out legacy garbage it carried over from C.

>The only well written C++ programs are basically just C programs
> implying well written means error prone, worthless, and unsafe
Lol

>Implying that the left is C in any way
lol

There isn't any other language that has a decent enough amount of abstraction while still letting you do low-level memory management, so not in the near future

I really prefer the left.

I know what is going on. I know what it a pointer and what is not.

What the fuck comes back from load_shapes()? WHO THE FUCK KNOWS. What type are we iterating? WHO THE FUCK KNOWS. How is that loop actually implemented? WHO KNOWS.

I feel like everything is just vague bullshit. Why does no one want to know what they're doing when it comes to code.

That's the point. I'd rather all of that information be implemented by the class/compiler

D

>what is self-descriptive and well-encapsulated code

You are the reason C++ is the clusterfuck of a language that it became

Sorry, what is **i on the left example? I get that *i is the actual element you're interested in, but what the heck is **i?

Pointer to the pointer

I'm tired, how is that useful/what does it do in this context?

I unironically think both C and C++ should be replaced with Ada

> pointer
Pointers can link to a random variable or it can link to a an array of variables.

> pointer of pointers
Same as before, except a bit more recursive. A pointer of a pointer can link to a random variable, or it can be linked to an array of pointers. In which an array of pointers can each individually link to a separate array of pointers

Think about it like this
A string is nothing more than an array of characters, right? How do we get an array of strings? We need an array of pointers, each linking to their own array of characters

Rust. Doesn't matter though because there's so much legacy C++ around that we'll be using it for the next 100 years or more.

No, i is a pointer to a pointer (an iterator into a vector of pointers to shapes), and **i is the thing pointed to by the thing pointed to by i (**i is a shape).

This code seems pretty broken regardless. Each function should manage its own memory, and returning a vector of pointers to newly-allocated objects seems like bad news. With how load_shapes() works it could look something like this …
circle p(42);
vector v = load_shapes();

for (int i = 0; i < v.size(); i++)
if (v[i] != NULL && *v[i] == p)
cout

Yeah it's gonna be replaced by C++++
Or C+=2

Fortunately your shitty opinion doesn't matter

C++++ is actually undefined behaviour. There's no sequence point between the two increments, so you can't tell whether it should be incremented once or twice.

I'll wait for Rust or John Blows language to do the job.

/thread
>having both classes and structs to have stack and dynamic objects separated
anyway, it's fucked

its not gonna be replaced soon but it shouldve been long time ago.

Well-Written C++ programs are actually as far away from C++ as possible.
Aside from the primitive data types, and operators good C++ programs basically don't use any C features.