My opinion on the advantages and disadvantages of C + + __c++

Source: Internet
Author: User
Now the trend is multi-language blending programming, so this article is for mixed programming.
1,c++ Advantages:
1.1, performance advantages.
1.2, evolutionary (reusable), evolving the team's convenient class library.
2,c++ a small advantage or suspected advantage:
2.1, "Snake Balm". In the era of mixed programming, the value of "Snake Balm" is small.

3,c++ Fundamental disadvantages:
Difficult to learn. Novice by the pointer to die, in hand (about 3 years of work experience) by STL Standard Library and template die, Master (about 5 years of work experience) was boost kill. Because the STL is difficult to understand, a large number of projects disable STL. I used to read a 20-line STL code and looked at it for 30 minutes and found two lines of code (two for) to handle. CSDN has a real case, a project has more boost, the person after leaving, the project will be cost. The cost of a boost master is higher than the rewrite project.
4, mitigation methods:
C + + software engineer Further division of labor:
A, the novice is mainly responsible for the interface, only need to use pointers, no management pointers. Management pointers are encapsulated in the underlying library.
B, the middle hand veteran is responsible for the logic layer.
c, the person responsible for dealing with the database.

5,c++ is not a fundamental disadvantage:
5.1 The understanding of the poor. "Difficult to learn" cause, in fact, people familiar with STL look familiar with STL code is very good to understand. Workaround:
A, divided into several libraries, novice participation in the library, prohibit or use STL.
Common functionality in B,stl, rewritten in a new library, the most important of which is the library's understanding.
6, small disadvantage or not disadvantage.
6.1. High threshold. Novice does not need to use pointer management, memory management, thread management, directly with the STL vector or MFC CArray allocation of space. Memory management, threading management a product, project only need a person will, it's OK.
6.2, low development efficiency. If there are many years of accumulated base library, development efficiency is higher. Because these base libraries are ideal for the current team.
6.3, beginner programmers are apt to make mistakes. Junior programmer, only permissions to modify a small number of libraries (in the majority of the interface).


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.