To learn C++ is it necessary to learn C?

Asked

Viewed 766 times

10

In case I want to learn about C++ I need to learn C before or they are different?

1 answer

14


No. In a way, it is recommended that you do not learn C. It can, but it can confuse you. If you decided to go to C++, go to it. Most excellent C++ programmers admit they don’t know C.

There is a myth that C++ is the "improved" C, but this is not true. C++ started out as an evolution of C, but so many new features were put in that it became another language. Although C++ Compile almost all C codes, this is not how you should program in C++. If you program in C++ the actual code is very different from the code in C.

And then you have to be careful with the material that you will choose to learn because many teach C in C++, that is, you don’t even know that they are fooling you, because it works, but it’s not right, then you learn this way:

Fiat 147 bagaçado andando pelas ruas

C++ is a high-level language with better zero-cost abstractions that is evolving a lot. C is considered a portable Assembly, and even so hardly evolves and has almost no abstractions.

My dream of consumption is that C++ has a mode that turns off the ability to use C resources.

  • 1

    "There is a myth that C++ is the "improved" C, but this is not true. C++ began as an evolution of C". So what I meant was that it was actually an evolution of C, but now it’s independent? The doubt came to me because I’ve heard it several times too.

  • 3

    It may have been this idea initially, but soon it was seen that it had to be another language, as I said, there is this myth that C++ is the evolved C. As in many things, but many even, in computing someone teaches wrong, and it spreads so much that people fail to learn the right. And worse, when someone says the right thing no one believes because almost everyone is saying the wrong thing, then people think this is the right thing. It’s fake news everywhere.

  • This is really true, even you already demystified one of these fake news for me in relation to the switch. So much so that they tell a lie the lie ends up becoming the truth for most. But thank you for answering.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.