Recently, I saw a question on a forum, and there was a reply like this:
C++ indeed can create all kinds of peculiarities. I don’t know if this is its glory or its sorrow.
This reply did not help the original poster’s question at all, as the issue was not about any specific language.
So when I saw his complaint, I thought about rebutting him, but later I focused on helping the original poster solve the question and did not reply to him.
The original poster’s question is caused by “rules and requirements”.
At the lowest level, if there are no requirements and rules, anything can be written in machine code indiscriminately. In that case, there would be no compiler intervening, and the original poster’s problem would not arise; it would just depend on whether the machine can execute the machine code according to the requirements. Thus, there would be no concept of language, and there would be no complaints about certain languages being peculiar.
At a higher level, assembly programs (assembly engines, which can be mistakenly understood as compilers for assembly language) are created to allow assembly programs to recognize your source code, so a small number of syntax rules are customized, but essentially they are still defined according to the processor’s working method, using different readable instruction codes to identify different machine codes. Don’t say assembly is difficult; it’s just that development with assembly is cumbersome. [Syntax rules are relatively simple, but the development process is cumbersome]
Then came the C language, and all the painful things spread from here. The C language defines “syntax rules,” which are much more complex compared to assembly syntax rules! The syntax rules of C are more complicated than assembly, but the development process is much easier than assembly because the C compiler does many cumbersome tasks for you. [Syntax rules are complicated, but the development process is relatively easy]
Then came C++. C++ not only has more complicated syntax rules than C, but also introduces support for object-oriented concepts. Leaving aside the object-oriented concepts for now, the syntax of C++ adds some features compared to C; the increase in keywords is certain, and I won’t list the other added features. The development process in C++ does not significantly reduce the workload compared to C, but there are improvements. This again confirms that [the more complicated the syntax rules, the relatively easier the development process].
Now, introducing the object-oriented concept, which is a set of abstract rules that can be completely detached from programming. I often hear people say that a certain language is object-oriented; in fact, many languages only support object-oriented programming, which does not mean that the language itself is object-oriented (if you insist that SmallTalk is object-oriented, I have nothing to say). With the support of object-oriented concepts, the development process becomes incredibly easy! Still, I must say [the more complicated the syntax rules and programming concepts are, the relatively easier the development process].
As for later languages like JAVA, C#, I won’t elaborate; the concepts have already been integrated into programming. To further improve development efficiency, some amazing companies or organizations simply implement some basic functional modules for programmers first, and then a series of library frameworks such as STL, Boost, MFC, ATL, VCL, dotNet, [JFC, JavaAPI](I still don’t know the exact name for Java’s libraries), etc., have emerged in droves… and then programmers are exhausted from learning these library frameworks.
https://blog.csdn.net/otishiono/article/details/7559013