Vc is not a dream, C ++ needs free heart

zhaozj2021-02-08  502

Regarding the issue of the commentary for VC / MFC / ATL, I really want to write an article very early to explain my own point of view, but I think this kind of article that is easy to trigger the battle is actually in the air consumption, it is better to do something Work. But now the idea of ​​Chinese programmers has reached a very dangerous side, in the previous computer newspaper, I got out of several 14-year-old children, just learn to write a few programs, just put the VC column For your dreams. When I was looking for a job last year, I was asked for a few companies, I won't be VC. After I got my reply, how did they believe in a four-year C, more than two years C , and use "idle "Time learns Java, Perl, a person who dares to write" Master C "in the" Specialist "column, actually only for VC" 解 了解 ", I see a disdain from their expression: "You still dare to understand C ? Do you have any time to learn? Even the VC will not, where can the horizontal?" I didn't expect them to explain the world outside the VC, because I When he mentioned the vocabulary of STL, he has been paying attention to their eyes, that is a kind of indifference, ignorant and indifferent. Everything is already very clear, explaining is futile, they don't know if there is C outside the VC.

Of course, everyone is worried, I finally found a satisfactory job. But this experience is very big for me, because I have deeply felt that when our Chinese programmers can have the opportunity to face the whole world with a pair of open eyes, our thoughts are quickly Closed up. A giant called Microsoft uses a huge concession in our thoughts, and said to us: "The day is so high, the land is so big, you can enjoy it!" The life of the Eden is fast ,,,, significance.

Not free, don't reinstate!

Our ability is of course limited. In a quite a long period of time, the boundaries we can reach will still be less than the domain that pioneers pioneering. But I am faith, just now, our ability can at least break through Microsoft to give us the world. Microsoft is good, she is very considerate, very good. But whether it is Microsoft, Ju Soft is good, in the hearts of our programmers, there is no Caesar. We can take you as a friend, but don't want to be our master! We must go out, although we know that the limit is existing, we can't exceed the former people for a long time, but we must go out. We can stop on the road to explore because of exhausted roads, but must never be afraid before the fence set.

C is my favorite language, I am willing to invest in her body for a lifetime. VC is also a good thing, my favorite C compiler under Windows. MFC / ATL is also a good thing. If you need it in the future, I will learn them seriously. However, the heavens and the earth in my heart are more wide, the language performance sets and standard libraries defined by standard C are a more beautiful landscape; STL's generic programming era of the era, makes me my heart; design mode Exquisite and consistent, the premiere of the mode programming paradigm, the maturity and huge hope for object-oriented software engineering, Tao / Ace's huge and exquisite, our Chinese people's own c ** language is moving, ..., let me Too much treasure is too much. Although I can touch something is just a small part, although I am more profound in this process, how much it is, but I can claim that the world is very exciting! I know that we are still living in the real world, and the spiritual happiness is not enough to fill a hunger. But we are talking now C ! Think about why you don't have to make it easier, better to earn money, to make the VC that is already difficult to learn into ideals in your own heart? Isn't it because VC can give you freedom, confidence and pride? If you realize that VC is also a bigger fence wall, why don't you want to rush out, get bigger freedom, confidence and pride?

B.Stroustrup said: "I want to learn C , should be to solve what kind of pioneering problem, not what has been repeated, which already has a mature framework and ready-made solution." C is the Blazers Language, is the language of thinkers, is the language above the "master" level. Perhaps many languages ​​are constantly surpassing it in terms of practicality, simplicity, now and in the future. However, I think there is no language to exceed it in a considerable period of time, in the development of software engineering ideas and creative software. Or, proficient in C language and its ideas, the ideological depth and the understanding of new technologies are far more than other language users, we may be called this artificial programmer. Because of this, I think is limited to the circle of VC, not a C programmer to be tolerated.

I think that as a true C programmer and freedom, there should be a kind heart. Don't be entangled in all day, who is the argument, don't hear it, I don't even say that a software uses VB, don't refuse to learn other languages. C is difficult to learn, it is difficult to use, and the application level is far away. These issues should be frankly admit that some efforts can be made to change these situations. It should be actively encouraged to mix other languages ​​with C , let C becomes a solid support behind them. I am not the boss of the company, but I think if my business can have this level of programmer, I will be proud of my business, and will give him the highest salary.

Attachment: I personally think that MFC implementation is defective: MFC is in the late 1989, the first-time, C is still very imperfect. At that time, MFC was quite advanced. However, since then, C happened (can be said to be) a huge change in revolutionary, compared with new C , MFC architecture and implementation mechanisms are relatively backward, and many excellent C features are not reasonably applied, but instead I have a stall in the stove. And the language of VC is increasingly unlike C , which is completely customized for Microsoft's own application, and even caught the standard. (However, in compilation technology, especially optimization, it is indeed that there is a few shortcomings from several shortcomings: 1. A lot of generous miles, the code is not like a lot. I really admire some people so patiently. Go to analyze them. 2. The realization mechanism of the message map is very awkward. Don't inherit I can understand, but why don't you use the table driver? Or that sentence, the code is not like it. 3. For the underlying SDK The package is too thin, the object-oriented feeling is insufficient. (Of course, there is also his benefits, but this is C !) 4. You also stove to fight RTTI, SEH, CSTRING, COBJXXXXXX (Container) These things, don't be very good, It can also be understood earlier in a few years, and now it is full. 5. Many occasions are originally a standard library that can be exhibited. The MFC is completely useless. 6. In order to cater to the MFC, many places in the compiler violate standards. 7. The limitations of the DOC / View system, it is difficult to break through.

If you come back, MFC is still a set of excellent tools. But now it has actually becomes a threat to China C programmers, it attracts too much energy and resources to the top of the branch, and truly good on the main road Things will not be seen. Lord must pass, so I don't have a big crime, write the above article. As I said, I always think that there is an endless argument is a mistake, the words, what you have said, everyone can criticize Discuss, but I am probably not going back to this topic.

转载请注明原文地址:https://www.9cbs.com/read-285.html

New Post(0)