Has C ++ lost its competitiveness?

Source: Internet
Author: User
Is the "C ++" in the "Turing comments" losing competitiveness? The C/C ++ user's journal is closed. "(http://blog.csdn.net/turingbook/archive/2006/05/18/743389.aspx"), or C ++ is going into recession. Personally, I think it is inevitable to go downhill due to the following points:
  • Too complicated. I think this is the most complicated language. It is difficult for beginners to get started. When they have just figured out pointers and references, they have encountered constructor and analysis structures, then I had to find out the copy structure and value assignment operations. At last I got a little started, but there were also public inheritance and private and protected inheritance, and allowed multiple inheritance, and so on, it also takes time to find out which members are correctly destructed and which resources cannot be recycled by throwing an exception in the constructor, and finally templates, generics ...... It seems that there is no end to learning, and it is easy to get discouraged.
  • Too gorgeous. In C, if you see a = B + C, you can basically add C to B and assign it to A. In C ++, the plus operator and the value assignment operator can be overloaded. As you can see, it may be far from the case. Without carefully reading the statements of the three classes ABC, you cannot be sure of them ...... The overload of operators has reached the point of no law, causing great confusion to the class users. However, the powerful templates make it easy for people to touch the north, just a few hours.CodeI have not seen what a complex template class really wants to do ......
  • Error-prone. Pointer is the source of all evil. Although C ++ has a template class in the auto_ptr standard library to manage pointers, its functionality is too weak to even be placed in STL containers, in multithreading, because the same object is referenced in multiple places, basically no one dares to delete a resource without using a template for reference counting ......
  • Some shortcomings in syntax. For example, C ++ allows sub-classes to overwrite functions of the same name of the parent class, and also allows override of virtual functions of the parent class (but does not require any keyword such as override ), when the base class changes the name of the original virtual function, the compiler will not give any warning, but the subclass is no longer a virtual function rewrite, instead, it declares a new function (which may never be called by the user ).
  • Other consequences for compatibility with C ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.