Why is C so difficult to understand

Why is C ++ so hard to learn?

There is a misunderstanding about C ++ as a language.

Let's take Java as a competitor. I have known both languages ​​from everyday practice for at least 15 years. So can compare well in terms of the learning curve.

If I take Java and only look at the language core, it is much less extensive. You actually have against. the C ++ language core to learn much less.

But now there is a catch from Java and other simpler languages: you cannot get by with the language core for larger projects. In order to cope with a larger project and keep it maintainable, I have to compensate for what C ++ offers in terms of language in Java & Co. with additional frameworks, tools and even VM extensions.

A very good example is OSGi. We use OSGi and the Eclipse RCP (not the IDE) to catch up on what I have direct access to with C ++ and the operating system functions (e.g. COM and ActiveX). OSGi does exactly what COM / ActiveX does by changing the core of the JavaVM! Because we simply don't have the options with the standard JVM that C ++ offers us with its native OS features.

And everyone who works with us on the project may first familiarize themselves with OSGi and Eclipse RCP.

Then there are nice things like annotations in Java. We also have that in C +++ with metaprogramming and macros?

In OSGi the package exports in the bundles? There we have the header files in C ++.

In OSGi the friend bundles? There we have the friend keyword in C ++.

The problem with C ++ is that somehow everything counts as a basis that can only be learned in other languages ​​with project requirements. In Java beginners' books there is no jumping framework, no OSGi etc. But anyone who joins company projects as a Java developer will have to do the Java EE Edition. And then he will notice that there is really a lot coming your way.

OK, there are still legacy "features" in C ++ that you could really do without today. For example, pointers and new [] delete [] are still thrown around in books today, although you could start with std :: vector first. No C ++ novice needs to know how to program your own container! The feeling of success is unnecessarily delayed. And for no reason!

The argument that you have to know how something works is completely irrelevant for a beginner in an OOP language! Especially with OOP, what counts: if I don't know exactly how something works behind it, then it's OO, i.e. encapsulation.

And no beginner worries at the beginning whether his program is scaled or runs a millisecond faster than variant 2.

But this is due to the C ++ books and ideologues, who cannot empathize with a beginner.

@CppLerner! If you don't understand something in C ++, especially the low-level stuff, then move on to your book. usually the aha-effect comes later! And buy the book "Effektiv C ++ Programming" and then "The pragmatic programmer".
Bjarne's “C ++ programming language” is NOT recommended. It is exactly what it is not supposed to do: confuse beginners with low-level! Bjarne says so himself, so Bjarne wrote another new book.

There is no reason not to act effectively or pragmatically. This is the only way to get ahead. A few C ++ folks on this forum are ideologues, and that's unprofessional. They are no better than the bad C ++ book authors.